pipenv icon indicating copy to clipboard operation
pipenv copied to clipboard

Getting "Failed to load paths error"

Open BreezySMX opened this issue 3 years ago • 4 comments

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:

  • ALLUSERSPROFILE
  • APPDATA
  • CHROME_CRASHPAD_PIPE_NAME
  • COMMONPROGRAMFILES
  • COMMONPROGRAMFILES(X86)
  • COMMONPROGRAMW6432
  • COMPUTERNAME
  • COMSPEC
  • CUDA_PATH
  • CUDA_PATH_V11_7
  • DRIVERDATA
  • GEOTRANS_DATA
  • HOMEDRIVE
  • HOMEPATH
  • LOCALAPPDATA
  • LOGONSERVER
  • NUMBER_OF_PROCESSORS
  • NVTOOLSEXT_PATH
  • ONEDRIVE
  • ORIGINAL_XDG_CURRENT_DESKTOP
  • OS
  • PATH
  • PATHEXT
  • PIPENV_ACTIVE
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PIP_PYTHON_PATH
  • PROCESSOR_ARCHITECTURE
  • PROCESSOR_IDENTIFIER
  • PROCESSOR_LEVEL
  • PROCESSOR_REVISION
  • PROGRAMDATA
  • PROGRAMFILES
  • PROGRAMFILES(X86)
  • PROGRAMW6432
  • PROMPT
  • PSMODULEPATH
  • PUBLIC
  • PYENV
  • PYENV_HOME
  • PYENV_ROOT
  • PYTHONDONTWRITEBYTECODE
  • PYTHONFINDER_IGNORE_UNSUPPORTED
  • SESSIONNAME
  • SYSTEMDRIVE
  • SYSTEMROOT
  • TEMP
  • TMP
  • USERDOMAIN
  • USERDOMAIN_ROAMINGPROFILE
  • USERNAME
  • USERPROFILE
  • VIRTUAL_ENV
  • WINDIR
  • ZES_ENABLE_SYSMAN
  • TERM_PROGRAM
  • TERM_PROGRAM_VERSION
  • LANG
  • COLORTERM
  • GIT_ASKPASS
  • VSCODE_GIT_ASKPASS_NODE
  • VSCODE_GIT_ASKPASS_EXTRA_ARGS
  • VSCODE_GIT_ASKPASS_MAIN
  • VSCODE_GIT_IPC_HANDLE
  • PIP_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-8
  • VIRTUAL_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": {}
}

BreezySMX avatar Jul 12 '22 15:07 BreezySMX

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

BreezySMX avatar Jul 12 '22 16:07 BreezySMX

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: Capture

And I'm still getting the same error.

BreezySMX avatar Jul 12 '22 18:07 BreezySMX

@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.

matteius avatar Jul 15 '22 01:07 matteius

@BreezySMX Could you recheck this experience with the new version of pipenv 2022.8.5?

matteius avatar Aug 05 '22 22:08 matteius

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.

dariocc avatar Aug 16 '22 02:08 dariocc

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.

matteius avatar Aug 16 '22 02:08 matteius

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: @.***>

BreezySMX avatar Oct 11 '22 09:10 BreezySMX