question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting "Failed to load paths error"

See original GitHub issue

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": {}
}

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
dariocccommented, Aug 16, 2022

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.

0reactions
BreezySMXcommented, Oct 11, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

pipenv install giving Failed to load paths errors - Stack Overflow
Remove your Pipfile.lock and try rerunning pipenv install to rebuild your dependencies from your Pipfile. It is looking for a virtual ...
Read more >
Failed to load paths using 2020.4.1b1 · Issue #4220 - GitHub
Using the new pre-release (2020.4.1b1), I am getting a Failed to load paths error on pipenv install --dev --system --verbose in GitLab CI:....
Read more >
Pipenv failed to load path - Python - Code with Mosh Forum
Hi Mosh & guys, I am following in the python course in a window's environment. I get an error on pipenv while installing...
Read more >
Common Pipenv Errors and How to Solve Them: Why Won't it ...
The second most common reason locking fails is that we attempt to install a package that is a pre-release version. You can resolve...
Read more >
Troubleshooting — Anaconda documentation
Windows error: Failed to create Anaconda menus or Failed to add Anaconda to the system PATH¶. During installation on a Windows system, a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found