Windows上的Pipenv失败,错误地安装wrapt(python 3.6.8)

问题描述 投票:1回答:1

我正在开始一个新的python项目,当我尝试安装虚拟环境时,wrapt一直失败。我已经阅读并尝试了所有可以在这里和其他论坛上找到的所有解决方案,但都没有成功。

您能想到让它再试一次的问题是什么?这是非常奇怪的,因为相同的项目和代码在其他类似的Windows机器中也可以工作...

D:\git_project>python --version
Python 3.6.8

D:\git_project>pip --version
pip 19.3.1 from c:\python36\lib\site-packages\pip (python 3.6)

D:\git_project>pipenv --version
pipenv, version 2018.11.27.dev0

D:\git_project>python -m pipenv install
Creating a virtualenv for this project…
Pipfile: D:\git_project\Pipfile
Using C:/Python36/python.exe (3.6.8) to create virtualenv…
[=== ] Creating virtual environment...Already using interpreter C:\Python36\python.exe
Using base prefix 'C:\\Python36'
New python executable in C:\Users\admin\.virtualenvs\git_project-UBvgpj5x\Scripts\python.exe
Installing setuptools, pip, wheel...
done.
Running virtualenv with interpreter C:/Python36/python.exe

Successfully created virtual environment!
Virtualenv location: C:\Users\admin\.virtualenvs\git_project-UBvgpj5x
Installing dependencies from Pipfile.lock (1e32a5)…
An error occurred while installing wrapt==1.11.2 --hash=sha256:565a021fd19419476b9362b05eeaa094178de64f8361e44468f9e9d7843901e1! Will try again.
  ================================ 84/84 - 00:02:14
Installing initially failed dependencies…
[InstallError]:   File "C:\Python36\lib\site-packages\pipenv\cli\command.py", line 251, in install
[InstallError]:       site_packages=state.site_packages
...
...
[pipenv.exceptions.InstallError]:       File "c:\users\admin\.virtualenvs\git_project-ubvgpj5x\lib\genericpath.py", line 30, in isfile
[pipenv.exceptions.InstallError]:         st = os.stat(path)
[pipenv.exceptions.InstallError]:     TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
[pipenv.exceptions.InstallError]:     ----------------------------------------
[pipenv.exceptions.InstallError]: ERROR: Command errored out with exit status 1:

这是完整输出的链接,以防您发现有用的东西以尝试弄清正在发生的事情?https://pastebin.com/raw/8gdUUZN8

谢谢!

python python-3.x pip virtualenv pipenv
1个回答
0
投票

在运行前固定设置以下变量:pipenv --three install

设置WRAPT_INSTALL_EXTENSIONS = false

© www.soinside.com 2019 - 2024. All rights reserved.