[英]how can i get IDLE (Python) to use packages installed by anaconda (windows 7 32bit)?
The title says it all i want to be able to use the packages that are installed with anaconda with idle so are there any ways of making this work? 标题说了所有这些,我希望能够闲置地使用与anaconda一起安装的软件包,那么有什么方法可以使这项工作? When i try to import packages with idle that i installed using anaconda it says package not found. 当我尝试导入使用anaconda安装的闲置程序包时,它说未找到程序包。 I need some help please and thank you in advance. 请给我一些帮助,谢谢。
The IDLE that comes with python 3.5.2 can only be run by python 3.5.2. python 3.5.2随附的IDLE只能由python 3.5.2运行。 Code you submit to python 3.5.2 through that IDLE can normally only access packages installed for 3.5.2, plus your own code. 通过该IDLE提交给python 3.5.2的代码通常只能访问为3.5.2安装的软件包以及您自己的代码。 I believe Anaconda 3.6.3 comes with Python 3.6.3 and the 3.6.3 standard library, including the 3.6.3 version of idlelib. 我相信Anaconda 3.6.3随附了Python 3.6.3和3.6.3标准库,包括3.lib版本的idlelib。
In order for your code to use the packages installed with anaconda, you must run your code with the anaconda binary. 为了使您的代码能够使用anaconda附带的软件包,您必须使用anaconda二进制文件运行代码。 To run your code from IDLE with the anaconda binary, you must run IDLE with that binary instead of some other binary (like the 3.5.2 binary. 要使用anaconda二进制文件从IDLE运行代码,必须使用该二进制文件而不是某些其他二进制文件(例如3.5.2二进制文件)运行IDLE。
When running Python 3.6.3 interactively, you can start IDLE 3.6.3 at a >>>
prompt with import idlelib.idle
. 交互式运行Python 3.6.3时,可以使用import idlelib.idle
在>>>
提示符下启动IDLE 3.6.3。 If you can start python 3.6.3 in a terminal (Command Prompt on Windows), then adding the arguments -m idlelib
will start IDLE. 如果可以在终端(Windows上的命令提示符)中启动python 3.6.3,则添加参数-m idlelib
将启动IDLE。
On Windows, I have no idea whether or not Anaconda adds 'Edit with IDLE 3.6.3' to the right-click context menu for .py and .pyw files, the way the python.org installer does. 在Windows上,我不知道Anaconda是否将py。和.pyw文件的右键菜单添加到“用IDLE 3.6.3编辑”,就像python.org安装程序那样。 On any system, you should be able to create a file or icon that will start 3.6.3 with IDLE, but details depend heavily on OS and version. 在任何系统上,您都应该能够创建以IDLE 3.6.3开头的文件或图标,但是详细信息在很大程度上取决于操作系统和版本。
I see idle is automatically installed with Anaconda Python 3. To launch idle open windows command prompt and type the below command: 我看到Anaconda Python 3自动安装了闲置。要启动闲置,请打开Windows命令提示符并键入以下命令:
idle() 闲()
In my other laptop i can also launch idle by this command on windows prompt: 在我的另一台笔记本电脑中,我也可以通过Windows提示符下的此命令启动空闲状态:
python -m idlelib.idle python -m idlelib.idle
Hope this helps. 希望这可以帮助。 See this discussion for more info https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/Dr8xFdKbA20 有关更多信息,请参见此讨论https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/Dr8xFdKbA20
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.