Getting "Failed to load paths error"
Issue description
I'm 99% sure my paths are correct. I've followed the paths in my environment variables to make sure the folders actually existed.
I'm having issues getting pipenv to work. I had it working in the past, but now it isn't. I'm running through the Visual Studio Code terminal, but am experiencing the same issues in command prompt.
I've ran pip uninstall pipenv and reinstalled it, to no avail.
I've created a new folder with a new 'test.py' file, with only 'print('hello')' written in it. Inside VSC I ran, pipenv in the terminal and got back the 'help' you would expect. Running pipenv shell gives me the following:
Successfully created virtual environment!
Failed to load paths: Unable to create process using 'C:\Users\GOST CTF SME\AppData\Local\Programs\Python\Python310\python.exe -c "import sysconfig, distutils.sysconfig, io, json, sys; paths = {u'purelib': u'{0}'.format(distutils.sysconfig.get_python_lib(plat_specific=0)),u'stdlib': u'{0}'.format(sysconfig.get_path('stdlib')),u'platlib': u'{0}'.format(distutils.sysconfig.get_python_lib(plat_specific=1)),u'platstdlib': u'{0}'.format(sysconfig.get_path('platstdlib')),u'include': u'{0}'.format(distutils.sysconfig.get_python_inc(plat_specific=0)),u'platinclude': u'{0}'.format(distutils.sysconfig.get_python_inc(plat_specific=1)),u'scripts': u'{0}'.format(sysconfig.get_path('scripts')),u'py_version_short': u'{0}'.format(distutils.sysconfig.get_python_version()), }; value = u'{0}'.format(json.dumps(paths));fh = io.open('c:/users/gostct~1/appdata/local/temp/tmp87pjy6v_.json', 'w'); fh.write(value); fh.close()"'
running pipenv install gives me the same errors and fails to install any library. It sounds like a path issue, so I checked my path variable and everything is there.
Per the install docs, I install using
pip install --user pipenv
Then I use python -m site --user-site and I get C:\Users\user 1\AppData\Roaming\Python\Python310\site-packages. The docs tell me to make sure this and \Scripts is in my PATH, which they both are. My error message suggests the path is in the "Local" folder, but the install docs tell me to use the Roaming folder. Regardless, both paths are there.
Expected result
pipenv to install the libraries.
Steps to replicate
Just run pipenv shell
Please run $ pipenv --support, and paste the results here. Don't put backticks (`) around it! The output already contains Markdown formatting.
$ pipenv --support
Pipenv version: '2022.7.4'
Pipenv location: 'C:\\Users\\GOST CTF SME\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\pipenv'
Python location: 'C:\\Users\\GOST CTF SME\\AppData\\Local\\Programs\\Python\\Python310\\python.exe'
Python installations found:
3.10.5:C:\Users\GOST CTF SME\AppData\Local\Programs\Python\Python310\python.exe
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '3.10.5',
'os_name': 'nt',
'platform_machine': 'AMD64',
'platform_python_implementation': 'CPython',
'platform_release': '10',
'platform_system': 'Windows',
'platform_version': '10.0.19044',
'python_full_version': '3.10.5',
'python_version': '3.10',
'sys_platform': 'win32'}
System environment variables:
ALLUSERSPROFILEAPPDATACHROME_CRASHPAD_PIPE_NAMECOMMONPROGRAMFILESCOMMONPROGRAMFILES(X86)COMMONPROGRAMW6432COMPUTERNAMECOMSPECCUDA_PATHCUDA_PATH_V11_7DRIVERDATAGEOTRANS_DATAHOMEDRIVEHOMEPATHLOCALAPPDATALOGONSERVERNUMBER_OF_PROCESSORSNVTOOLSEXT_PATHONEDRIVEORIGINAL_XDG_CURRENT_DESKTOPOSPATHPATHEXTPIPENV_ACTIVEPIP_DISABLE_PIP_VERSION_CHECKPIP_PYTHON_PATHPROCESSOR_ARCHITECTUREPROCESSOR_IDENTIFIERPROCESSOR_LEVELPROCESSOR_REVISIONPROGRAMDATAPROGRAMFILESPROGRAMFILES(X86)PROGRAMW6432PROMPTPSMODULEPATHPUBLICPYENVPYENV_HOMEPYENV_ROOTPYTHONDONTWRITEBYTECODEPYTHONFINDER_IGNORE_UNSUPPORTEDSESSIONNAMESYSTEMDRIVESYSTEMROOTTEMPTMPUSERDOMAINUSERDOMAIN_ROAMINGPROFILEUSERNAMEUSERPROFILEVIRTUAL_ENVWINDIRZES_ENABLE_SYSMANTERM_PROGRAMTERM_PROGRAM_VERSIONLANGCOLORTERMGIT_ASKPASSVSCODE_GIT_ASKPASS_NODEVSCODE_GIT_ASKPASS_EXTRA_ARGSVSCODE_GIT_ASKPASS_MAINVSCODE_GIT_IPC_HANDLEPIP_SHIMS_BASE_MODULE
Pipenv–specific environment variables:
PIPENV_ACTIVE:1
Debug–specific environment variables:
PATH:C:\Users\GOST CTF SME\.virtualenvs\GOST_CTF_SME-lp717o7Z\Scripts;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\libnvvp;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\OpenSSH\;C:\Users\GOST CTF SME\Downloads\chromedriver_win32;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files (x86)\Common Files\i2 Shared\Geotrans\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Program Files\NVIDIA Corporation\Nsight Compute 2022.2.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Users\GOST CTF SME\.pyenv\pyenv-win\bin;C:\Users\GOST CTF SME\.pyenv\pyenv-win\shims;C:\Users\GOST CTF SME\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\GOST CTF SME\AppData\Local\Programs\Python\Python310\;C:\Users\GOST CTF SME\AppData\Local\Programs\Python\Python310;C:\Users\GOST CTF SME\AppData\Local\Microsoft\WindowsApps;C:\Users\GOST CTF SME\Desktop\Work\1. Dev\Utilities\Chrome_Driver;C:\Users\GOST CTF SME\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\GOST CTF SME\AppData\Roaming\Python\Python310\site-packages\;C:\Users\GOST CTF SME\AppData\Roaming\Python\Python310\Scripts\;C:\Users\GOST CTF SME\AppData\Local\Programs\Python\Python310\Lib\site-packages;LANG:en_US.UTF-8VIRTUAL_ENV:C:\Users\GOST CTF SME\.virtualenvs\GOST_CTF_SME-lp717o7Z
Contents of Pipfile ('C:\Users\GOST CTF SME\Pipfile'):
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
[dev-packages]
Contents of Pipfile.lock ('C:\Users\GOST CTF SME\Pipfile.lock'):
{
"_meta": {
"hash": {
"sha256": "ebffa69a1fa192d1cef7cb42ad79231ca976565c5ce371a70160b3048d3cbc06"
},
"pipfile-spec": 6,
"requires": {},
"sources": [
{
"name": "pypi",
"url": "https://pypi.org/simple",
"verify_ssl": true
}
]
},
"default": {},
"develop": {}
}
Tried the following:
- https://github.com/pypa/pipenv/issues/4337
- Which boils down to pip install --upgrade pip git+https://github.com/pypa/pipenv
- Issue still exists
- https://github.com/pypa/pipenv/issues/4220
- pipenv --where returns C:\Users\GOST CTF SME
I created a new profile on my computer, installed Python 3.10.5 and visual studio code. I followed the same steps I outlined above and pipenv worked as expect. I copied my paths exactly from that account to this one:
And I'm still getting the same error.
@BreezySMX Check if your system has a Python31 directory as well, I recently had my Python auto update and there was both a Python310 (old) directory and a Python31 patched newer version of 3.10 and there were pathing issues with some things referencing the new and some things referencing the old path which was now incomplete.
Mine was like this:
C:\Users\matte\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python31\Scripts
Sorry I don't have much else to offer, but it sure sounds like a system environment issue with the account that is getting the error. FWIW I am running python from the Microsoft Store.
@BreezySMX Could you recheck this experience with the new version of pipenv 2022.8.5?
I was getting this error on 2021.5.29 (strangely enough, only for one project). Deleting virtualenvs directory, lock file or using pipenv rm would not make any difference.
But updating to 2022.8.15 solved the issue for me.
I am going to close this issue out, but we can re-open if you find its in fact still an issue on 2022.8.15.
On vacation right now. I'll check when I get back next week, thanks for the update though.
R/S Christopher Brown Counter Threat Finance Analyst @.*** (c) 941-264-5479 [cid:70c2a850-42da-494d-9fdd-b8661394c4ac]
From: Matt Davis @.> Sent: Friday, August 5, 2022 6:20 PM To: pypa/pipenv @.> Cc: Brown, Christopher @.>; Mention @.> Subject: Re: [pypa/pipenv] Getting "Failed to load paths error" (Issue #5173)
CAUTION: This email originated from outside of SMX. Do not click links or open attachments unless you recognize the sender and know the content is safe.
@BreezySMXhttps://github.com/BreezySMX Could you recheck this experience with the new version of pipenv 2022.8.5?
— Reply to this email directly, view it on GitHubhttps://github.com/pypa/pipenv/issues/5173#issuecomment-1207026908, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AYLN56HM4XASPVWEKIKK7V3VXWHRFANCNFSM53LQ6D5Q. You are receiving this because you were mentioned.Message ID: @.***>