Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
alumuko opened this issue Jul 12, 2023 · 5 comments · Fixed by #5793
Labels
Type: Bug 🐛 This issue is a bug.

Comments

@alumuko
Copy link

alumuko commented Jul 12, 2023

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 ```
@matteius matteius added the Type: Bug 🐛 This issue is a bug. label Jul 12, 2023
@matteius
Copy link
Member

Hmmm, I spent a bit of time trying to debug this last night and this bug is actually occurring in an internal pip method we call, which is odd seeing as pip handles the same command just fine.

@matteius
Copy link
Member

matteius commented Aug 7, 2023

@alumuko This appears to also be solved on the branch that drops requirementslib: #5793

matte@LAPTOP-N5VSGIBD MINGW64 ~/Projects/pipenv-triage/issue-5789
$ pipenv install ./../../pyparsing-3.1.0-py3-none-any.whl
Creating a virtualenv for this project...
Pipfile: C:\Users\matte\Projects\pipenv-triage\issue-5789\Pipfile
Using default python from C:\Users\matte\AppData\Local\Programs\Python\Python311\python.exe (3.11.2) to create virtualenv...
[   =] Creating virtual environment...created virtual environment CPython3.11.2.final.0-64 in 6921ms
  creator CPython3Windows(dest=C:\c\users\matte\.virtualenvs\issue-5789-EmqWSKte, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=C:\Users\matte\AppData\Local\pypa\virtualenv)
    added seed packages: pip==23.1.2, setuptools==68.0.0, wheel==0.40.0
  activators BashActivator,BatchActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

Successfully created virtual environment!
Virtualenv location: C:\c\Users\matte\.virtualenvs\issue-5789-EmqWSKte
Creating a Pipfile for this project...
Installing ./../../pyparsing-3.1.0-py3-none-any.whl...
Resolving ./../../pyparsing-3.1.0-py3-none-any.whl...
Added pyparsing to Pipfile's [packages] ...
Installation Succeeded
Pipfile.lock not found, creating...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
Success!
Locking [dev-packages] dependencies...
Updated Pipfile.lock (fa664f03c27244ed293d2222cd14a32c1e8a0f01e4a72589b88b02ef25e4f19a)!
Installing dependencies from Pipfile.lock (e4f19a)...
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.

matte@LAPTOP-N5VSGIBD MINGW64 ~/Projects/pipenv-triage/issue-5789
$ cat Pipfile
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
pyparsing = {file = "..\\..\\pyparsing-3.1.0-py3-none-any.whl"}

[dev-packages]

[requires]
python_version = "3.9"

matte@LAPTOP-N5VSGIBD MINGW64 ~/Projects/pipenv-triage/issue-5789
$ cat Pipfile.lock
{
    "_meta": {
        "hash": {
            "sha256": "fa664f03c27244ed293d2222cd14a32c1e8a0f01e4a72589b88b02ef25e4f19a"
        },
        "pipfile-spec": 6,
        "requires": {
            "python_version": "3.9"
        },
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.org/simple",
                "verify_ssl": true
            }
        ]
    },
    "default": {
        "pyparsing": {
            "editable": true,
            "file": "..\\..\\pyparsing-3.1.0-py3-none-any.whl",
            "hashes": [
                "sha256:d554a96d1a7d3ddaf7183104485bc19fd80543ad6ac5bdb6426719d766fb06c1"
            ],
            "markers": "python_full_version >= '3.6.8'"
        }
    },
    "develop": {}
}

@matteius
Copy link
Member

matteius commented Aug 7, 2023

Relative extras specifiers also appears to be working on that branch :-D

$ pipenv install ./../../pyparsing-3.1.0-py3-none-any.whl['diagrams']
Creating a Pipfile for this project...
Installing ./../../pyparsing-3.1.0-py3-none-any.whl[diagrams]...
Resolving ./../../pyparsing-3.1.0-py3-none-any.whl[diagrams]...
Added pyparsing to Pipfile's [packages] ...
Installation Succeeded
Pipfile.lock not found, creating...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
Success!
Locking [dev-packages] dependencies...
Updated Pipfile.lock (bd7475b277f4a60e19abc7196a368eb9e9e18bc4d3bd79cbdbe91a8a878145ec)!
Installing dependencies from Pipfile.lock (8145ec)...
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.

matte@LAPTOP-N5VSGIBD MINGW64 ~/Projects/pipenv-triage/issue-5789
$ cat Pipfile
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
pyparsing = {extras = ["diagrams"], file = "..\\..\\pyparsing-3.1.0-py3-none-any.whl"}

[dev-packages]

[requires]
python_version = "3.9"

matte@LAPTOP-N5VSGIBD MINGW64 ~/Projects/pipenv-triage/issue-5789
$ cat Pipfile.lock
{
    "_meta": {
        "hash": {
            "sha256": "bd7475b277f4a60e19abc7196a368eb9e9e18bc4d3bd79cbdbe91a8a878145ec"
        },
        "pipfile-spec": 6,
        "requires": {
            "python_version": "3.9"
        },
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.org/simple",
                "verify_ssl": true
            }
        ]
    },
    "default": {
        "jinja2": {
            "hashes": [
                "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852",
                "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"
            ],
            "version": "==3.1.2"
        },
        "markupsafe": {
            "hashes": [
                "sha256:05fb21170423db021895e1ea1e1f3ab3adb85d1c2333cbc2310f2a26bc77272e",
                "sha256:0a4e4a1aff6c7ac4cd55792abf96c915634c2b97e3cc1c7129578aa68ebd754e",
                "sha256:10bbfe99883db80bdbaff2dcf681dfc6533a614f700da1287707e8a5d78a8431",
                "sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686",
                "sha256:1577735524cdad32f9f694208aa75e422adba74f1baee7551620e43a3141f559",
                "sha256:1b40069d487e7edb2676d3fbdb2b0829ffa2cd63a2ec26c4938b2d34391b4ecc",
                "sha256:282c2cb35b5b673bbcadb33a585408104df04f14b2d9b01d4c345a3b92861c2c",
                "sha256:2c1b19b3aaacc6e57b7e25710ff571c24d6c3613a45e905b1fde04d691b98ee0",
                "sha256:2ef12179d3a291be237280175b542c07a36e7f60718296278d8593d21ca937d4",
                "sha256:338ae27d6b8745585f87218a3f23f1512dbf52c26c28e322dbe54bcede54ccb9",
                "sha256:3c0fae6c3be832a0a0473ac912810b2877c8cb9d76ca48de1ed31e1c68386575",
                "sha256:3fd4abcb888d15a94f32b75d8fd18ee162ca0c064f35b11134be77050296d6ba",
                "sha256:42de32b22b6b804f42c5d98be4f7e5e977ecdd9ee9b660fda1a3edf03b11792d",
                "sha256:504b320cd4b7eff6f968eddf81127112db685e81f7e36e75f9f84f0df46041c3",
                "sha256:525808b8019e36eb524b8c68acdd63a37e75714eac50e988180b169d64480a00",
                "sha256:56d9f2ecac662ca1611d183feb03a3fa4406469dafe241673d521dd5ae92a155",
                "sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac",
                "sha256:65c1a9bcdadc6c28eecee2c119465aebff8f7a584dd719facdd9e825ec61ab52",
                "sha256:68e78619a61ecf91e76aa3e6e8e33fc4894a2bebe93410754bd28fce0a8a4f9f",
                "sha256:69c0f17e9f5a7afdf2cc9fb2d1ce6aabdb3bafb7f38017c0b77862bcec2bbad8",
                "sha256:6b2b56950d93e41f33b4223ead100ea0fe11f8e6ee5f641eb753ce4b77a7042b",
                "sha256:787003c0ddb00500e49a10f2844fac87aa6ce977b90b0feaaf9de23c22508b24",
                "sha256:7ef3cb2ebbf91e330e3bb937efada0edd9003683db6b57bb108c4001f37a02ea",
                "sha256:8023faf4e01efadfa183e863fefde0046de576c6f14659e8782065bcece22198",
                "sha256:8758846a7e80910096950b67071243da3e5a20ed2546e6392603c096778d48e0",
                "sha256:8afafd99945ead6e075b973fefa56379c5b5c53fd8937dad92c662da5d8fd5ee",
                "sha256:8c41976a29d078bb235fea9b2ecd3da465df42a562910f9022f1a03107bd02be",
                "sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2",
                "sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707",
                "sha256:962f82a3086483f5e5f64dbad880d31038b698494799b097bc59c2edf392fce6",
                "sha256:9dcdfd0eaf283af041973bff14a2e143b8bd64e069f4c383416ecd79a81aab58",
                "sha256:aa7bd130efab1c280bed0f45501b7c8795f9fdbeb02e965371bbef3523627779",
                "sha256:ab4a0df41e7c16a1392727727e7998a467472d0ad65f3ad5e6e765015df08636",
                "sha256:ad9e82fb8f09ade1c3e1b996a6337afac2b8b9e365f926f5a61aacc71adc5b3c",
                "sha256:af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad",
                "sha256:b076b6226fb84157e3f7c971a47ff3a679d837cf338547532ab866c57930dbee",
                "sha256:b7ff0f54cb4ff66dd38bebd335a38e2c22c41a8ee45aa608efc890ac3e3931bc",
                "sha256:bfce63a9e7834b12b87c64d6b155fdd9b3b96191b6bd334bf37db7ff1fe457f2",
                "sha256:c011a4149cfbcf9f03994ec2edffcb8b1dc2d2aede7ca243746df97a5d41ce48",
                "sha256:c9c804664ebe8f83a211cace637506669e7890fec1b4195b505c214e50dd4eb7",
                "sha256:ca379055a47383d02a5400cb0d110cef0a776fc644cda797db0c5696cfd7e18e",
                "sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b",
                "sha256:cd0f502fe016460680cd20aaa5a76d241d6f35a1c3350c474bac1273803893fa",
                "sha256:ceb01949af7121f9fc39f7d27f91be8546f3fb112c608bc4029aef0bab86a2a5",
                "sha256:d080e0a5eb2529460b30190fcfcc4199bd7f827663f858a226a81bc27beaa97e",
                "sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb",
                "sha256:df0be2b576a7abbf737b1575f048c23fb1d769f267ec4358296f31c2479db8f9",
                "sha256:e09031c87a1e51556fdcb46e5bd4f59dfb743061cf93c4d6831bf894f125eb57",
                "sha256:e4dd52d80b8c83fdce44e12478ad2e85c64ea965e75d66dbeafb0a3e77308fcc",
                "sha256:fec21693218efe39aa7f8599346e90c705afa52c5b31ae019b2e57e8f6542bb2"
            ],
            "markers": "python_version >= '3.7'",
            "version": "==2.1.3"
        },
        "pyparsing": {
            "editable": true,
            "extras": [
                "diagrams"
            ],
            "file": "..\\..\\pyparsing-3.1.0-py3-none-any.whl",
            "hashes": [
                "sha256:d554a96d1a7d3ddaf7183104485bc19fd80543ad6ac5bdb6426719d766fb06c1"
            ],
            "markers": "python_full_version >= '3.6.8'"
        },
        "railroad-diagrams": {
            "hashes": [
                "sha256:a91332bac900cb3c367331fa9b699f0897bcf86b7264f65458675df430d04ce3",
                "sha256:d414ff2439ed53345950e197938097548721b5d097926fafeaabc2bb069b44f9"
            ],
            "version": "==3.0.1"
        }
    },
    "develop": {}
}

@ROT-at-OpenEP
Copy link

Has this issue been fixed by now? What needs to be updated? Package pip or pipenv or both?

@matteius
Copy link
Member

@ROT-at-OpenEP as mentioned in my last comments, there is a forward looking branch that I believe fixes this issue. #5793

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug 🐛 This issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants