Skip to content

On Windows, specifying a **relative path** in "pipenv install" command occurs OSError: Bad Path  #5789

@alumuko

Description

@alumuko

Issue description

On Windows, specifying a relative path in "pipenv install" command as shown below will result in "OSError: Bad path: C;\C:".
(The drive letter "C" appears twice)

pipenv install ./../packages/pyparsing-3.1.0-py3-none-any.whl

Expected result

On Linux, same command is no problem. (Success)

On Windows, "pipenv run pip install" does not cause this problem. (Success)
However, I prefer to use "pipenv install" because "pip install" does not save the installation information into the Pipfile.


$ pipenv --support

Pipenv version: '2023.7.11'

Pipenv location: 'C:\\Users\\Main User\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\pipenv'

Python location: 'C:\\Users\\Main User\\AppData\\Local\\Programs\\Python\\Python311\\python.exe'

OS Name: 'nt'

User pip version: '23.1.2'

user Python installations found:

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.11.1',
 'os_name': 'nt',
 'platform_machine': 'AMD64',
 'platform_python_implementation': 'CPython',
 'platform_release': '10',
 'platform_system': 'Windows',
 'platform_version': '10.0.19045',
 'python_full_version': '3.11.1',
 'python_version': '3.11',
 'sys_platform': 'win32'}

System environment variables:

  • ALLUSERSPROFILE
  • APPDATA
  • COMMONPROGRAMFILES
  • COMMONPROGRAMFILES(X86)
  • COMMONPROGRAMW6432
  • COMPUTERNAME
  • COMSPEC
  • DRIVERDATA
  • HOMEDRIVE
  • HOMEPATH
  • LOCALAPPDATA
  • LOGONSERVER
  • NUMBER_OF_PROCESSORS
  • ONEDRIVE
  • OS
  • PATH
  • PATHEXT
  • PIPENV_VENV_IN_PROJECT
  • PROCESSOR_ARCHITECTURE
  • PROCESSOR_IDENTIFIER
  • PROCESSOR_LEVEL
  • PROCESSOR_REVISION
  • PROGRAMDATA
  • PROGRAMFILES
  • PROGRAMFILES(X86)
  • PROGRAMW6432
  • PSMODULEPATH
  • PUBLIC
  • SESSIONNAME
  • SYSTEMDRIVE
  • SYSTEMROOT
  • TEMP
  • TMP
  • USERDOMAIN
  • USERDOMAIN_ROAMINGPROFILE
  • USERNAME
  • USERPROFILE
  • VBOX_MSI_INSTALL_PATH
  • WINDIR
  • __PSLOCKDOWNPOLICY
  • PYTHONDONTWRITEBYTECODE
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv–specific environment variables:

  • PIPENV_VENV_IN_PROJECT: true

Contents of Pipfile ('D:\Develop\pipenv-test\testapp\Pipfile'):

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
pyparsing = {path = "./../packages/pyparsing-3.1.0-py3-none-any.whl"}

[dev-packages]

[requires]
python_version = "3.11"
python_full_version = "3.11.1"
```[tasklist] ### Tasks ```

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions