Kev*_*n91 7 python spyder anaconda python-3.7
我已经在配备Spyder和Python 3.6的Windows 10机器上安装了Anaconda,但我希望升级到Python 3.7
使用Python 3.7创建Anaconda环境非常简单:
conda create --name py37 python=3.7
Run Code Online (Sandbox Code Playgroud)
要么:
conda create --name py370 python=3.7.0 --channel conda-forge
Run Code Online (Sandbox Code Playgroud)
但是,在这种环境中启动Spyder会将其抛回Python 3.6.我尝试直接在Tools -> SettingsSpyder中指定python.exe(对于版本3.7),但是在重新启动时,Spyder内核无法启动并且将显示它们需要包:ipykernel和cloudpickle.
conda install在环境中尝试它们时,会出现以下情况:
The following packages will be DOWNGRADED:
python: 3.7.0-hea74fb7_0 --> 3.6.6-hea74fb7_0
Run Code Online (Sandbox Code Playgroud)
哪个会再次将python从3.7降级到3.6.
我最后的尝试是使用命令:
conda install python==3.7
Run Code Online (Sandbox Code Playgroud)
输出失败了
Solving environment: failed
UnsatisfiableError: The following specifications were found to be in conflict:
- python-dateutil -> python[version='>=2.7,<2.8.0a0']
- python-dateutil -> six
- python==3.7
Use "conda info <package>" to see the dependencies for each package.
Run Code Online (Sandbox Code Playgroud)
问题不在于如何将Conda升级到Python 3.7,但我怎样才能让Spyder在自己的环境中使用Python 3.7
Jam*_*mes 12
当您spyder从CMD /终端运行时,您的操作系统会尝试在系统的PATH上找到spyder可执行文件.在这种情况下,它将默认返回到基本环境的spyder版本,它运行Python 3.6.
到目前为止,我发现的最好方法是将spyder安装到新环境中; 激活环境,然后运行spyder(它应该启动本地环境中的版本).
conda create --name py37 python=3.7
conda install --name py37 spyder -c conda-forge
conda activate py37
spyder
Run Code Online (Sandbox Code Playgroud)
但是,这需要spyder的版本来支持python 3.7.目前尚未提供(截至7月2日),但不应该太长.