问题描述
这是我在这里的第一篇文章.我试图找到这个问题的答案,但无济于事.
This is my first post here. I tried to find an answer to this question but to no avail.
只需在Win10机器上安装Anaconda2(2.7.11 Python内核)即可.我正在尝试学习conda命令.这是我的问题.
Just installed Anaconda2 (2.7.11 Python kernel) on my Win10 machine. I am trying to learn the conda command. Here is my problem.
- 我转到Anaconda提示窗口.
- 我用
conda create -n myenv python=3.4
命令创建一个虚拟环境. - 我用
activate myenv
激活环境. - 当我用
conda env list
列出环境时,它显示为活动状态(旁边是星号). - 当我从命令行启动python时,它表明它正在运行3.4.
- 与ipython相同.
- 当我键入spyder时,它会打开spyder窗口,但显示给我2.7.11.通过运行
print(sys.version)
可以确认.
- I go to the Anaconda prompt window.
- I create a virtual environmant with
conda create -n myenv python=3.4
command. - I activate the environment with
activate myenv
. - When I list the environmants with
conda env list
it shows as active (star next to it). - When I start python from a command line it shows me that it is running 3.4.
- The same with ipython.
- When I type spyder it opens the spyder window but shows me 2.7.11. This is confirmed by running
print(sys.version)
.
我做错什么了吗,还是Windows 10问题.
Am I doing anything wrong or is this just windows 10 problem.
预先感谢,安迪
推荐答案
键入spyder
时,此命令的搜索从conda环境创建的路径开始.如果找不到它,它将去其他地方搜索.在您的情况下,使用默认的Anaconda安装路径.因此,在激活环境后:
When you type spyder
, the search for this command begins in the paths that the conda environment created. If it cannot find it there, it will go and search at other places. In your case in the paths of the default Anaconda install. So after you activate your environment:
activate myenv
您需要在此环境中sypder
内部安装:
(myenv) conda install spyder
其中(myenv)
表示活动环境.
这篇关于Spyder无法在Windows 10的Anaconda虚拟环境中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!