库安装使用python2,需要使用python3

2024-09-28 01:27:22 发布

您现在位置:Python中文网/ 问答频道 /正文

为了安装auto-sklearn,我通过Homebrew安装了Python3(这是必需的)。我将我的.bash_profile中的Python版本别名为alias python='python3',因此如下所示:

$python -V
>> Python 3.6.1

但是当我curl处理依赖项时,我得到以下错误:

Command "/usr/local/opt/python/bin/python2.7 -u -c "import setuptools,tokenize;__file__='/private/var/folders/46/rh_gbvxn2q19xbn10grfz3r00000gn/T/pip-build-VBNFhl/pyrfr/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/46/rh_gbvxn2q19xbn10grfz3r00000gn/T/pip-q9LGfp-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/46/rh_gbvxn2q19xbn10grfz3r00000gn/T/pip-build-VBNFhl/pyrfr/

这清楚地表明它正试图使用Python2.7来执行安装命令。如何使用Python3强制系统执行该命令?你知道吗


Tags: pipbuildvarcodeopenprivaterecordpython3

热门问题