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

Getting "Failed to load paths error" #5173

Closed
BreezySMX opened this issue Jul 12, 2022 · 7 comments
Closed

Getting "Failed to load paths error" #5173

BreezySMX opened this issue Jul 12, 2022 · 7 comments
Labels
Type: Question ❔ This is a question or a request for support.

Comments

@BreezySMX
Copy link

BreezySMX commented Jul 12, 2022

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
Copy link
Author

Tried the following:

@BreezySMX
Copy link
Author

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.

@matteius
Copy link
Member

@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 matteius added the Type: Question ❔ This is a question or a request for support. label Jul 15, 2022
@matteius
Copy link
Member

matteius commented Aug 5, 2022

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

@dariocc
Copy link

dariocc commented 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.

@matteius
Copy link
Member

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.

@BreezySMX
Copy link
Author

BreezySMX commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Question ❔ This is a question or a request for support.
Projects
None yet
Development

No branches or pull requests

3 participants