我正在尝试更新Spyder,以修复Spyder 3.2.3中的某些错误。
但是当我打电话给https://github.com/spyder-ide/spyder/issues/9019#event-2225858161中提到的conda update spyder
时,Anaconda提示符显示如下:
,并且Spyder尚未更新为最新版本(3.3.3)。 我猜我无法更新Spyder的原因是因为我的Conda不是最新版本,所以我跑了
conda update -n base -c defaults conda
但是在那之后(将conda更新到最新版本4.6.11),我发现无法打开我的所有Spyder和Anaconda Navigator。看来,这些命令不仅更新了Conda,而且还将其他一些软件包更新到py3.7。
当我再次致电conda update spyder
时,提示如下:
WARNING: The conda.compat module is deprecated and will be removed in a future release.
Collecting package metadata: done
Solving environment: |
The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:
- defaults/win-64::anaconda==5.3.1=py37_0
- https://mirrors.ustc.edu.cn/anaconda/pkgs/free/win-64::anaconda-navigator==1.6.4=py36_0
- defaults/win-64::astropy==3.0.4=py37hfa6e2cd_0
- defaults/win-64::blaze==0.11.3=py37_0
- defaults/win-64::bottleneck==1.2.1=py37h452e1ab_1
- defaults/win-64::dask==0.19.1=py37_0
- defaults/win-64::datashape==0.5.4=py37_1
- defaults/win-64::h5py==2.8.0=py37h3bdd7fb_2
- defaults/win-64::imageio==2.4.1=py37_0
- defaults/win-64::matplotlib==2.2.3=py37hd159220_0
- defaults/win-64::mkl-service==1.1.2=py37hb217b18_5
- defaults/win-64::mkl_fft==1.0.4=py37h1e22a9b_1
- defaults/win-64::mkl_random==1.0.1=py37h77b88f5_1
- defaults/win-64::numba==0.39.0=py37h830ac7b_0
- defaults/win-64::numexpr==2.6.8=py37h9ef55f4_0
- defaults/win-64::numpy-base==1.15.1=py37h8128ebf_0
- defaults/win-64::odo==0.5.1=py37_0
- defaults/win-64::pandas==0.23.4=py37h830ac7b_0
- defaults/win-64::patsy==0.5.0=py37_0
- defaults/win-64::pytables==3.4.4=py37he6f6034_0
- defaults/win-64::pytest-arraydiff==0.2=py37h39e3cac_0
- defaults/win-64::pytest-astropy==0.4.0=py37_0
- defaults/win-64::pytest-doctestplus==0.1.3=py37_0
- defaults/win-64::pywavelets==1.0.0=py37h452e1ab_0
- defaults/win-64::scikit-image==0.14.0=py37h6538335_1
- defaults/win-64::scikit-learn==0.19.2=py37heebcf9a_0
- defaults/win-64::scipy==1.1.0=py37h4f6bf74_1
- defaults/win-64::seaborn==0.9.0=py37_0
- defaults/win-64::statsmodels==0.9.0=py37h452e1ab_0
done
# All requested packages already installed.
我想也许python版本冲突(我的python版本是3.6.2)导致Spyder和Navigator异常。因此,我尝试通过调用conda install python = 3.6
将这些软件包恢复到py3.6版本,但是它不起作用。
这是conda list -version
(最近的2转)的结果
2019-04-09 22:59:08 (rev 3)
certifi {2016.2.28 (https://mirrors.ustc.edu.cn/anaconda/pkgs/free) -> 2019.3.9}
conda {4.5.13 -> 4.6.11}
cryptography {1.8.1 (https://mirrors.ustc.edu.cn/anaconda/pkgs/free) -> 2.6.1}
curl {7.52.1 (https://mirrors.ustc.edu.cn/anaconda/pkgs/free) -> 7.64.0}
libcurl {7.61.0 -> 7.64.0}
libpng {1.6.34 -> 1.6.36}
libprotobuf {3.2.0 (https://mirrors.ustc.edu.cn/anaconda/pkgs/free) -> 3.6.1}
libssh2 {1.8.0 (https://mirrors.ustc.edu.cn/anaconda/pkgs/free) -> 1.8.0}
menuinst {1.4.7 (https://mirrors.ustc.edu.cn/anaconda/pkgs/free) -> 1.4.16}
openssl {1.0.2l (https://mirrors.ustc.edu.cn/anaconda/pkgs/free) -> 1.1.1b}
protobuf {3.2.0 (https://mirrors.ustc.edu.cn/anaconda/pkgs/free) -> 3.6.1}
pycurl {7.43.0 (https://mirrors.ustc.edu.cn/anaconda/pkgs/free) -> 7.43.0.2}
pyqt {5.6.0 (https://mirrors.ustc.edu.cn/anaconda/pkgs/free) -> 5.9.2}
python {3.6.2 (https://mirrors.ustc.edu.cn/anaconda/pkgs/free) -> 3.6.8}
qt {5.6.2 -> 5.9.7}
requests {2.14.2 (https://mirrors.ustc.edu.cn/anaconda/pkgs/free) -> 2.21.0}
sip {4.18 (https://mirrors.ustc.edu.cn/anaconda/pkgs/free) -> 4.19.8}
sqlite {3.24.0 -> 3.27.2}
vc {14 (https://mirrors.ustc.edu.cn/anaconda/pkgs/free) -> 14.1}
+krb5-1.16.1
2019-04-09 23:02:48 (rev 4)
cryptography {2.6.1 -> 1.8.1 (https://mirrors.ustc.edu.cn/anaconda/pkgs/free)}
curl {7.64.0 -> 7.52.1 (https://mirrors.ustc.edu.cn/anaconda/pkgs/free)}
krb5 {1.16.1 -> 1.13.2 (https://mirrors.ustc.edu.cn/anaconda/pkgs/free)}
libcurl {7.64.0 -> 7.61.1}
libpng {1.6.36 -> 1.6.34}
libprotobuf {3.6.1 -> 3.2.0 (https://mirrors.ustc.edu.cn/anaconda/pkgs/free)}
libssh2 {1.8.0 -> 1.8.0 (https://mirrors.ustc.edu.cn/anaconda/pkgs/free)}
menuinst {1.4.16 -> 1.4.14}
openssl {1.1.1b -> 1.0.2l (https://mirrors.ustc.edu.cn/anaconda/pkgs/free)}
protobuf {3.6.1 -> 3.2.0 (https://mirrors.ustc.edu.cn/anaconda/pkgs/free)}
pycurl {7.43.0.2 -> 7.43.0 (https://mirrors.ustc.edu.cn/anaconda/pkgs/free)}
pyqt {5.9.2 -> 5.6.0 (https://mirrors.ustc.edu.cn/anaconda/pkgs/free)}
python {3.6.8 -> 3.6.2 (https://mirrors.ustc.edu.cn/anaconda/pkgs/free)}
qt {5.9.7 -> 5.6.2}
sqlite {3.27.2 -> 3.25.2}
vc {14.1 -> 14 (https://mirrors.ustc.edu.cn/anaconda/pkgs/free)}
这是conda info
active environment : base
active env location : C:\Users\lenovo\Anaconda3
shell level : 1
user config file : C:\Users\lenovo\.condarc
populated config files : C:\Users\lenovo\.condarc
conda version : 4.6.11
conda-build version : 3.0.19
python version : 3.6.2.final.0
base environment : C:\Users\lenovo\Anaconda3 (writable)
channel URLs : https://mirrors.ustc.edu.cn/anaconda/pkgs/free/win-64
https://mirrors.ustc.edu.cn/anaconda/pkgs/free/noarch
https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/win-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : C:\Users\lenovo\Anaconda3\pkgs
C:\Users\lenovo\.conda\pkgs
C:\Users\lenovo\AppData\Local\conda\conda\pkgs
envs directories : C:\Users\lenovo\Anaconda3\envs
C:\Users\lenovo\.conda\envs
C:\Users\lenovo\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.6.11 requests/2.21.0 CPython/3.6.2 Windows/10 Windows/10.0.17134
administrator : False
netrc file : None
offline mode : False
解决此问题的最佳方法是什么?
如何让Spyder重新工作?
答案 0 :(得分:1)
幸运的是,我已经使用命令'conda install --revision 2'修复了Spyder,并在Anaconda Navigator中将Spyder更新到了3.3.4版本。
conda install --revision 2
可以显示以前的每个修订版,因此我使用命令{{1}}将环境恢复到更新conda之前的状态。之后,我的Spyder和Anaconda Navigator就可以正常使用了。然后,在Anaconda Navigator中将我的Spyder更新到版本3.3.4。
答案 1 :(得分:1)
这适用于python3.8和spyder4.1.5:
conda install pyqt --force-reinstall
答案 2 :(得分:0)