Python 使用pipenv安装TensorFlow时出错
我正在尝试使用pipenv安装TensorFlow 这是我的文件:Python 使用pipenv安装TensorFlow时出错,python,tensorflow,pipenv,Python,Tensorflow,Pipenv,我正在尝试使用pipenv安装TensorFlow 这是我的文件: [[source]] name = "pypi" url = "https://pypi.org/simple" verify_ssl = true [dev-packages] pylint = "*" [packages] python-telegram-bot = "*" imdbpy = "*" matplotlib = "*" scikit-image = "*" scikit-learn = "*" tensor
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
pylint = "*"
[packages]
python-telegram-bot = "*"
imdbpy = "*"
matplotlib = "*"
scikit-image = "*"
scikit-learn = "*"
tensorflow = "*"
[requires]
python_version = "3.8"
然后我运行:
pipenv install tensorflow
哪些产出:
Installing tensorflow…
Adding tensorflow to Pipfile's [packages]…
Installation Succeeded
Pipfile.lock (989c3d) out of date, updating to (0d6760)…
Locking [dev-packages] dependencies…
Success!
Locking [packages] dependencies…
Locking Failed!
然后是一个大的回溯,以:
pipenv.patched.notpip._internal.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in C:\Users\lucas\AppData\Local\Temp\tmpyh639mq4build\functools32\
我的虚拟环境使用Python 3.8.0 64位
我做错了什么?正如评论所指出的,Tensorflow最多只支持python 3.7(截至2020年3月)。您可以在文档的中找到更多信息 因此,要解决您的问题:
pipenv--rm删除虚拟环境
[requires]
python_version = "3.7"
pipenv install--dev
重新创建环境,运行pipenv install tensorflow
安装tensorflow完成了 正如评论所指出的,Tensorflow最多只支持python 3.7(截至2020年3月)。您可以在文档的中找到更多信息 因此,要解决您的问题:
pipenv--rm删除虚拟环境
[requires]
python_version = "3.7"
pipenv install--dev
重新创建环境,运行pipenv install tensorflow
安装tensorflow完成了 官方tensorflow系统需求说明:“Python3.4–3.7”官方tensorflow系统需求说明:“Python3.4–3.7”