使用pip3安装Orange3

问题描述

我一直试图在我的Linux机器上安装orange3。尝试后:

pip3 install orange3

我收到此详细错误:

WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Defaulting to user installation because normal site-packages is not writeable
Collecting orange3
  Using cached Orange3-3.27.1-cp36-cp36m-manylinux1_x86_64.whl (2.7 MB)
Collecting AnyQt>=0.0.11
  Downloading AnyQt-0.0.11-py2.py3-none-any.whl (46 kB)
Collecting baycomp>=1.0.2
  Using cached baycomp-1.0.2-py3-none-any.whl (17 kB)
Requirement already satisfied: pip>=9.0 in ./.local/lib/python3.6/site-packages (from orange3) (20.2.4)
Requirement already satisfied: scikit-learn!=0.23.0,>=0.22.0 in ./.local/lib/python3.6/site-packages (from orange3) (0.22.1)
...
Collecting orange-widget-base>=4.8.1
  Using cached orange_widget_base-4.9.0-py3-none-any.whl (229 kB)
...
Collecting python-louvain>=0.13
  Using cached python-louvain-0.14.tar.gz (19 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys,setuptools,tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_us67ap2/python-louvain/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_us67ap2/python-louvain/setup.py'"'"';f=getattr(tokenize,'"'"'open'"'"',open)(__file__);code=f.read().replace('"'"'\r\n'"'"','"'"'\n'"'"');f.close();exec(compile(code,__file__,'"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-t2a936sw
         cwd: /tmp/pip-install-_us67ap2/python-louvain/
    Complete output (28 lines):
    Traceback (most recent call last):
      File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py",line 2455,in resolve
        return functools.reduce(getattr,self.attrs,module)
    AttributeError: type object 'Distribution' has no attribute '_finalize_feature_opts'
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "<string>",line 1,in <module>
      File "/tmp/pip-install-_us67ap2/python-louvain/setup.py",line 25,in <module>
        scripts=['bin/community']
...
        raise ImportError(str(exc)) from exc
    ImportError: type object 'Distribution' has no attribute '_finalize_feature_opts'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

我已经尝试使用来更新pip和设置工具

pip install --upgrade pip

等,但我仍然收到此错误。

解决方法

您的setuptools软件包版本可能太旧。尝试升级它(也可以同时点上它):python3 -m pip install setuptools pip

以下是描述问题的setuptools问题的链接:https://github.com/pypa/setuptools/issues/2029

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...