当使用 Python 3.5 启动 Spyder 3 时,我遇到了一些缺少依赖项的问题。我使用 Debian Strech 并切换到 Python 3.5 作为标准设置 它说启动 Spyder3 rod 0.9.4 和 pylint 0.2.5 时是 NOK。
以下是 Spyder3 的列表:
jedi >=0.9.0 : 0.10.0 (OK)
matplotlib >=1.0 : 2.0.0 (OK)
nbconvert >=4.0 : 4.2.0 (OK)
numpy >=1.7 : 1.12.1 (OK)
pandas >=0.13.1 : 0.19.2 (OK)
pep8 >=0.6 : 1.7.0 (OK)
psutil >=0.3 : 5.0.1 (OK)
pyflakes >=0.6.0 : 1.3.0 (OK)
pygments >=2.0 : 2.2.0 (OK)
pylint >=0.25 : None (OK)
qtconsole >=4.2.0: 4.2.1 (OK)
rope >=0.9.4 : None (NOK)
sphinx >=0.6.6 : 1.4.9 (OK)
sympy >=0.7.3 : None (NOK)
我尝试安装 pylint3 并得到:
apt-get install pylint3
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
[deleted huge list packages for autoremoval]
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
python3-astroid python3-isort python3-lazy-object-proxy python3-wrapt
Suggested packages:
pylint-doc python3-mccabe
The following NEW packages will be installed:
pylint3 python3-astroid python3-isort python3-lazy-object-proxy
python3-wrapt
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
5 not fully installed or removed.
Need to get 384 kB of archives.
After this operation, 1,861 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 amd64 python3-lazy-object-proxy amd64 1.2.2-1 [20.7 kB]
Get:2 amd64 python3-wrapt amd64 1.9.0-2 [31.5 kB]
Get:3 http://ftp.ch.debian.org/debian stretch/main amd64 python3-astroid all 1.4.9-1 [89.7 kB]
Get:4 http://ftp.ch.debian.org/debian stretch/main amd64 python3-isort all 4.2.5+ds1-2 [38.0 kB]
Get:5 amd64 pylint3 all 1.6.5-1 [204 kB]
Fetched 384 kB in 0s (430 kB/s)
Selecting previously unselected package python3-lazy-object-proxy.
(Reading database ... 298576 files and directories currently installed.)
Preparing to unpack .../python3-lazy-object-proxy_1.2.2-1_amd64.deb ...
Unpacking python3-lazy-object-proxy (1.2.2-1) ...
Selecting previously unselected package python3-wrapt.
Preparing to unpack .../python3-wrapt_1.9.0-2_amd64.deb ...
Unpacking python3-wrapt (1.9.0-2) ...
Selecting previously unselected package python3-astroid.
Preparing to unpack .../python3-astroid_1.4.9-1_all.deb ...
Unpacking python3-astroid (1.4.9-1) ...
Selecting previously unselected package python3-isort.
Preparing to unpack .../python3-isort_4.2.5+ds1-2_all.deb ...
Unpacking python3-isort (4.2.5+ds1-2) ...
Selecting previously unselected package pylint3.
Preparing to unpack .../pylint3_1.6.5-1_all.deb ...
Unpacking pylint3 (1.6.5-1) ...
Setting up pylint (1.6.5-1) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package pylint (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up python3-lazy-object-proxy (1.2.2-1) ...
Setting up python3-isort (4.2.5+ds1-2) ...
Setting up python3-wrapt (1.9.0-2) ...
dpkg: dependency problems prevent configuration of python3-spyder:
python3-spyder depends on pylint; however:
Package pylint is not configured yet.
dpkg: error processing package python3-spyder (--configure):
dependency problems - leaving unconfigured
Processing triggers for man-db (2.7.6.1-2) ...
dpkg: dependency problems prevent configuration of python-spyder:
python-spyder depends on pylint; however:
Package pylint is not configured yet.
dpkg: error processing package python-spyder (--configure):
dependency problems - leaving unconfigured
Setting up python3-astroid (1.4.9-1) ...
Setting up pylint3 (1.6.5-1) ...
dpkg: dependency problems prevent configuration of spyder:
spyder depends on python-spyder (= 3.1.3+dfsg1-3); however:
Package python-spyder is not configured yet.
dpkg: error processing package spyder (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of spyder3:
spyder3 depends on python3-spyder (= 3.1.3+dfsg1-3); however:
Package python3-spyder is not configured yet.
dpkg: error processing package spyder3 (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
pylint
python3-spyder
python-spyder
spyder
spyder3
E: Sub-process /usr/bin/dpkg returned an error code (1)
这里有什么问题?
答案1
我缺少 pylint 和绳子的依赖项。我无法通过 apt-get 更新或升级来解决缺少的 deps。
运行: $ sudo pip install -U spider
解决了缺少的依赖项。