pip3使用AttributeError安装spyder:' _NamespacePath'

时间:2018-01-30 03:33:12

标签: python ubuntu pip spyder

在Ubuntu 16.04中,我想在未安装Anaconda的情况下在我的默认spyder3上安装python3,但是当我启动pip3spyder3时,我收到此错误:

File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2066, in _rebuild_mod_path
orig_path.sort(key=position_in_sys_path)
AttributeError: '_NamespacePath' object has no attribute 'sort'

1 个答案:

答案 0 :(得分:1)

此错误来自pip。更新pip和setuptools:

pip3 install --upgrade pip
pip3 install --upgrade setuptools

然后用pip再次安装spy。

来源:https://github.com/GoogleCloudPlatform/google-cloud-python/issues/2990