gpt4 book ai didi

python - 安装 python 库时需要 RuntimeError : Python version >= 3. 5

转载 作者:行者123 更新时间:2023-12-05 07:18:23 28 4
gpt4 key购买 nike

我正在使用虚拟环境。因为我有一个 python 版本 3.7.0

virtualenv --python=python3.7 .env

现在,每当我试图在那里安装任何库时,它都会给我这个错误

Downloading/unpacking scikit-learn==0.20.2
Running setup.py (path:/tmp/pycharm-packaging421/scikit-learn/setup.py) egg_info for package scikit-learn
Partial import of sklearn during the build process.

Requirement already satisfied (use --upgrade to upgrade): numpy>=1.8.2 in /usr/local/lib/python3.4/dist-packages (from scikit-learn==0.20.2)
Downloading/unpacking scipy>=0.13.3 (from scikit-learn==0.20.2)
Running setup.py (path:/tmp/pycharm-packaging421/scipy/setup.py) egg_info for package scipy
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pycharm-packaging421/scipy/setup.py", line 31, in <module>
raise RuntimeError("Python version >= 3.5 required.")
RuntimeError: Python version >= 3.5 required.
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

File "<string>", line 17, in <module>

File "/tmp/pycharm-packaging421/scipy/setup.py", line 31, in <module>

raise RuntimeError("Python version >= 3.5 required.")

RuntimeError: Python version >= 3.5 required.

谁能帮我解决这个问题?

最佳答案

要在旧版本的 python3 中使用 virtualenv,请使用此方法。

创建:python3 -m venv .venv

激活:源.venv/bin/activate

退出:停用

我在 Debian 8.11 的 Python 3.4.2 上测试它

关于python - 安装 python 库时需要 RuntimeError : Python version >= 3. 5,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58298246/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com