我正在尝试使用 pip install auto-sklearn
安装 auto-sklearn,但它引发了错误:
Command "/usr/bin/python3.5 -u -c "
import setuptools, tokenize;
__file__='/tmp/pip-build-tl8y2tfg/psutil/setup.py';
f=getattr(tokenize, 'open', open)(__file__);
code=f.read().replace('\r\n', '\n');
f.close();
exec(compile(code, __file__, 'exec'))
"install
--record /tmp/pip-7t8rbku0-record/install-record.txt
--single-version-externally-managed --compile"
failed with error code 1 in /tmp/pip-build-tl8y2tfg/psutil/
在我的 /tmp/
目录中没有以“pip-”开头的内容。
我按照 manual 中的所有步骤进行了操作, 但仍然有这个错误。
我还尝试使用来自 this question 的命令,但在这两种情况下都出现了相同的错误。
我的操作系统是 Ubuntu 16.04.2。
如何安装 auto-sklearn?
最佳答案
auto-sklearn
安装需要 python 3.5 或更高版本。此外,它还依赖于此处提到的包:https://raw.githubusercontent.com/automl/auto-sklearn/master/requirements.txt
根据错误,您似乎在安装 psutil
时遇到问题。
更好的方法是拥有 python 3.5+ 环境。然后使用 pip install auto-sklearn
。
- 检查您使用的是哪个版本/路径 -
which python
,which pip
- 安装 python 3.5 或更高版本,如果您还没有:steps to follow
- 安装正确版本的python 后,设置python3.5 的虚拟环境。 Follow设置虚拟环境的代码:
python3 -m pip install --user virtualenv
source env/bin/activate
- 最后调用
pip install auto-sklearn
更新:
如果您使用的是 anaconda,则以下命令将启动您的虚拟环境:
conda update conda
#更新你当前的conda版本conda create --name py35 python=3.5
#为 python 3.5 创建一个虚拟环境source activate py35
#激活环境
再次在此处发布您的查询,以防您不确定这些步骤。
关于python - 自动sklearn安装错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44660524/