Pipenv не может создать виртуальную среду (windows) - PullRequest
0 голосов
/ 30 апреля 2020

Я установил pipenv так:

pip install --user pipenv

Я добавил PATH в переменные окружения. После этого я запустил pipenv shell, и это показывает:

Creating a virtualenv for this project…
Pipfile: E:\full-stack projects\newschoolazure\Pipfile
Using c:\users\user\appdata\local\programs\python\python37-32\python.exe (3.7.4) to create virtualenv…
[==  ] Creating virtual environment...Already using interpreter c:\users\user\appdata\local\programs\python\python37-32\python.exe
Using base prefix 'c:\\users\\user\\appdata\\local\\programs\\python\\python37-32'
New python executable in C:\Users\User\.virtualenvs\newschoolazure-9I-v4-rZ\Scripts\python.exe
ERROR: The executable C:\Users\User\.virtualenvs\newschoolazure-9I-v4-rZ\Scripts\python.exe is not functioning
ERROR: It thinks sys.prefix is 'e:\\full-stack projects\\newschoolazure' (should be 'c:\\users\\user\\.virtualenvs\\newschoolazure-9i-v4-rz')
ERROR: virtualenv is not compatible with this system or executable
Note: some Windows users have reported this error when they installed Python for "Only this user" or have multiple versions of Python installed. Copying the appropriate PythonXX.dll to the virtualenv Scripts/ directory may fix this problem.

Failed creating virtual environment
[pipenv.exceptions.VirtualenvCreationException]:   File "C:\Users\User\AppData\Roaming\Python\Python37\site-packages\pipenv\cli\command.py", line 390, in shell
[pipenv.exceptions.VirtualenvCreationException]:       pypi_mirror=state.pypi_mirror,
[pipenv.exceptions.VirtualenvCreationException]:   File "C:\Users\User\AppData\Roaming\Python\Python37\site-packages\pipenv\core.py", line 2156, in do_shell
[pipenv.exceptions.VirtualenvCreationException]:       three=three, python=python, validate=False, pypi_mirror=pypi_mirror,
[pipenv.exceptions.VirtualenvCreationException]:   File "C:\Users\User\AppData\Roaming\Python\Python37\site-packages\pipenv\core.py", line 574, in ensure_project
[pipenv.exceptions.VirtualenvCreationException]:       pypi_mirror=pypi_mirror,
[pipenv.exceptions.VirtualenvCreationException]:   File "C:\Users\User\AppData\Roaming\Python\Python37\site-packages\pipenv\core.py", line 506, in ensure_virtualenv
[pipenv.exceptions.VirtualenvCreationException]:       python=python, site_packages=site_packages, pypi_mirror=pypi_mirror
[pipenv.exceptions.VirtualenvCreationException]:   File "C:\Users\User\AppData\Roaming\Python\Python37\site-packages\pipenv\core.py", line 935, in do_create_virtualenv
[pipenv.exceptions.VirtualenvCreationException]:       extra=[crayons.blue("{0}".format(c.err)),]
[pipenv.exceptions.VirtualenvCreationException]: Fatal Python error: initfsencoding: unable to load the file system codec
LookupError: no codec search functions registered: can't find encoding

Current thread 0x0000130c (most recent call first):

Failed to create virtual environment.

Что мне делать?

...