我正在使用 Django Heroku 模板开发一个网站。我想在我的 Windows 计算机上在这个网站上工作,使用 Heroku 和 Python 的要求之一是拥有 pipenv(该项目有一个 Pipfile)。
为了在 Windows 上安装 pipenv,我在 cmd 终端中尝试了两个命令,这给出了大致相同的错误:
pip install pipenv
结果是
Collecting pipenv
Using cached pipenv-11.9.0.tar.gz
Complete output from command python setup.py egg_info:
error in pipenv setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected version spec in pathlib;python_version<"3.4" at ;python_version<"3.4"
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\myUserName\AppData\Local\Temp\pip-build-267yrlop\pipenv\
和:
easy_install -U pipenv
结果是
Searching for pipenv
Reading https://pypi.python.org/simple/pipenv/
Best match: pipenv 11.9.0
Downloading https://pypi.python.org/packages/aa/43/e7426676c659fa3c1db28653ceee3571efbaaec2d2795bca00212989268a/pipenv-11.9.0.tar.gz#md5=0cdefd8434dc2b30415708d517730dcb
Processing pipenv-11.9.0.tar.gz
Writing C:\Users\myUserName\AppData\Local\Temp\easy_install-p2bvwljy\pipenv-11.9.0\setup.cfg
Running pipenv-11.9.0\setup.py -q bdist_egg --dist-dir C:\Users\myUserName\AppData\Local\Temp\easy_install-p2bvwljy\pipenv-11.9.0\egg-dist-tmp-vfore9pv
error: Setup script exited with error in pipenv setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected version spec in pathlib;python_version<"3.4" at ;python_version<"3.4"
我真的不明白错误信息。pipenv 的设置脚本中似乎有一个错误,但很可能不是。还是期望 Python 版本低于 3.4?(如果是这样,我如何用我的 Python 3.5 安装它?)
编辑:我尝试过使用管理员权限,进出 virtualenv,但结果相同。