Spyder无法在Windows 10的Anaconda虚拟环境中运行 [英] Spyder does not run in Anaconda virtual environment on Windows 10

查看:927
本文介绍了Spyder无法在Windows 10的Anaconda虚拟环境中运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我在这里的第一篇文章.我试图找到这个问题的答案,但无济于事.

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.

  1. 我转到Anaconda提示窗口.
  2. 我用conda create -n myenv python=3.4命令创建一个虚拟环境.
  3. 我用activate myenv激活环境.
  4. 当我用conda env list列出环境时,它显示为活动状态(旁边是星号).
  5. 当我从命令行启动python时,它表明它正在运行3.4.
  6. 与ipython相同.
  7. 当我键入spyder时,它会打开spyder窗口,但显示给我2.7.11.通过运行print(sys.version)可以确认.
  1. I go to the Anaconda prompt window.
  2. I create a virtual environmant with conda create -n myenv python=3.4 command.
  3. I activate the environment with activate myenv.
  4. When I list the environmants with conda env list it shows as active (star next to it).
  5. When I start python from a command line it shows me that it is running 3.4.
  6. The same with ipython.
  7. 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虚拟环境中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆