我有一个现有项目,一切都很好。由于Heroku似乎需要特定的python运行时版本进行部署,因此我将python(windows 64)升级到了3.7.4。 在我的通常文件夹中运行pipenv shell时,出现以下消息:
C:\Users\henry\Desktop\testldc>pipenv shell
Creating a virtualenv for this project…
Pipfile: C:\Users\henry\Desktop\testldc\Pipfile
Using c:\users\henry\appdata\local\programs\python\python37\python.exe
(3.7.4) to create virtualenv…
[=== ] Creating virtual environment...
然后出现此错误:
Creating virtual environment...
Failed creating virtual environment
[pipenv.exceptions.VirtualenvCreationException]: File
"c:\users\henry\appdata\local\programs\python\python37\lib\site-
packages\pipenv\cli\command.py", line 254, in install
[pipenv.exceptions.VirtualenvCreationException]:
editable_packages=state.installstate.editables,
[pipenv.exceptions.VirtualenvCreationException]: File
"c:\users\henry\appdata\local\programs\python\python37\lib\site-
packages\pipenv\core.py", line 1741, in do_install
[pipenv.exceptions.VirtualenvCreationException]:
pypi_mirror=pypi_mirror,
[pipenv.exceptions.VirtualenvCreationException]: File
"c:\users\henry\appdata\local\programs\python\python37\lib\site-
packages\pipenv\core.py", line 574, in ensure_project
[pipenv.exceptions.VirtualenvCreationException]:
pypi_mirror=pypi_mirror,
[pipenv.exceptions.VirtualenvCreationException]: File
"c:\users\henry\appdata\local\programs\python\python37\lib\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\henry\appdata\local\programs\python\python37\lib\site-
packages\pipenv\core.py", line 935, in do_create_virtualenv
[pipenv.exceptions.VirtualenvCreationException]: extra=[crayons.blue("
{0}".format(c.err)),]
[pipenv.exceptions.VirtualenvCreationException]: Traceback (most recent call
last):
File "c:\users\henry\appdata\local\programs\python\python37\lib\site-
packages\virtualenv.py", line 2611, in <module>
main()
File "c:\users\henry\appdata\local\programs\python\python37\lib\site-
packages\virtualenv.py", line 814, in main
sub_process_call = subprocess.Popen([interpreter, file] + sys.argv[1:],
env=env)
File
"c:\users\henry\appdata\local\programs\python\python37\lib\subprocess.py",
line 775, in __init__
restore_signals, start_new_session)
File
"c:\users\henry\appdata\local\programs\python\python37\lib\subprocess.py",
line 1178, in _execute_child
startupinfo)
OSError: [WinError 1455] Le fichier de pagination est insuffisant pour
terminer cette opération
Failed to create virtual environment.
我尝试在另一个先前的项目文件夹上运行pipenv shell,问题是相同的:安装我没有要求,并且在安装过程中卡住了。谢谢您的帮助!
我只是想用更新的python版本运行我通常的虚拟环境。
答案 0 :(得分:0)
解决了它,这显然是virtualenv的问题。 升级到16.6.2版本。
pip install virtualenv==16.6.2