我已经在Windows 10机器上安装了Anaconda,它附带了Spyder和Python3.6,但我希望升级到Python3.7
使用Python3.7创建Anaconda环境很容易,可以使用:
conda create --name py37 python=3.7或者:
conda create --name py370 python=3.7.0 --channel conda-forge但是,在此环境中启动Spyder会将其抛回Python3.6。我尝试在Spyder的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这将再次将python从3.7降到3.6。
我最后的尝试是使用以下命令:
conda install python==3.7的输出失败。
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.问题不是如何将Conda升级到Python3.7,而是如何让Spyder在自己的环境中使用Python3.7。
发布于 2018-07-02 15:21:07
当您从CMD/终端运行spyder时,您的操作系统试图在系统路径上找到spyder可执行文件。在本例中,它将默认返回到基本环境的spyder版本,该版本运行Python3.6。
到目前为止,我发现的最佳方法是将spyder安装到新的环境中;激活环境,然后运行spyder (这将激发本地环境中的版本)。
conda create --name py37 python=3.7
conda install --name py37 spyder -c conda-forge
conda activate py37
spyder但是,这需要spyder版本来支持python3.7。目前尚未公布(截至2018年7月2日),但应不会太久。
编辑:Python3.7的SpyderforPython3.7可用。
https://stackoverflow.com/questions/51139232
复制相似问题