简体   繁体   English

我无法在Atom文本编辑器中导入与Anaconda Prompt一起安装的模块。 Miniconda会引起点子问题吗?

[英]I can't import a module I installed with Anaconda Prompt in my Atom text editor. Is Miniconda causing problems with pip?

I have Miniconda installed. 我安装了Miniconda。 I successfully installed matplotlib with Anaconda Prompt. 我已将Anponda Prompt成功安装了matplotlib。 My text editor Atom gives me a ModuleNotFoundError when I attempt to import matplotlib. 当我尝试导入matplotlib时,我的文本编辑器Atom给我一个ModuleNotFoundError。 Why isn't Atom able to find matplotlib after I installed it with Anaconda Prompt? 我在Anaconda Prompt中安装了matplotlib后,为什么Atom无法找到它呢? matplotlib is located in Miniconda3 > Lib > site-packages matplotlib位于Miniconda3>库> site-packages

My current understanding is that I need to globally install matplotlib in my Python directory in order for Atom to be able to find it, but when I try to pip inside Command Prompt, I get an error saying: "'pip' is not recognized as an internal or external command, operable program or batch file." 我目前的理解是,我需要在Python目录中全局安装matplotlib才能使Atom能够找到它,但是当我尝试在命令提示符下进行pip操作时,出现了一条错误消息:“'pip'不能识别为内部或外部命令,可操作程序或批处理文件。”

Am I having issues because python was installed as part of Miniconda? 我是否有问题,因为python是作为Miniconda的一部分安装的? Why can't I pip install with Command Prompt, and only with Anaconda prompt? 为什么我不能使用命令提示符仅通过Anaconda提示进行pip安装? Why can't Atom find my Anaconda Prompt-installed matplotlib? 为什么Atom找不到我的Anaconda Prompt安装的matplotlib?

I am new to programming and Python. 我是编程和Python的新手。 Your help would be very much appreciated. 您的帮助将不胜感激。 I am considering uninstalling Miniconda (though that does not appear to be straightforward) and then installing Python by itself and going from there, but I don't think I should need to do this. 我正在考虑卸载Miniconda(尽管这似乎并不简单),然后自己安装Python并从那里进行安装,但是我认为我不需要这样做。

If you loaded python using Anaconda you should use conda instead of pip. 如果使用Anaconda加载了python,则应使用conda而不是pip。 The commands are very similar. 命令非常相似。 I would not start over. 我不会重新开始。 You will need to use virtual environments and that's much easier to do with conda. 您将需要使用虚拟环境,而使用conda则要容易得多。 Some conda commands are listed here . 这里列出一些conda命令。 To create vitual environments follow instructions here . 要创建虚拟环境,请按照此处的说明进行操作。

Go to the terminal window and type conda install numpy, for example, to install numpy. 转到终端窗口,然后键入conda install numpy,例如,安装numpy。 If you're not on a Mac use the PowerShell or equivalent to the terminal for mac to run Unix-like commands. 如果您不在Mac上,请使用PowerShell或等效于mac的终端来运行类似Unix的命令。 Use same window as you were using for pip. 使用与用于点子相同的窗口。

Conda is a package manager and you can read more about it here . Conda是软件包经理,您可以在这里阅读有关它的更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法导入使用 pip 安装的模块(anaconda python) - Can't import module installed with pip (anaconda python) 我安装了 Anaconda 和 Miniconda - 我可以删除一个吗? - I have both Anaconda & Miniconda installed - can I delete one? Leetcode 向我展示了一个关键错误,但它在我的文本编辑器中运行良好。 我怎样才能解决这个问题? - Leetcode is showing me a key error, but it works fine in my text editor. How can I fix this? 我在全新的 Ubuntu 安装上同时安装了 anaconda 和 miniconda。 我应该预料会遇到问题吗? - I installed both anaconda and miniconda on a fresh Ubuntu installation. Should I expect to run into problems? 嗨,我刚刚用 pip 安装了请求,但我无法导入它 - Hi, I just installed requests with pip but I can't import it 我无法使用Atom编辑器访问我的Python脚本 - I can't access my Python scripts using the Atom editor 在我安装 anaconda 后没有新的 pip 安装的模块可以导入 - after I installed anaconda no new pip installed modules can be imported 为什么我不能使用 pip 或 miniconda 安装 matplotlib 或 pandas? - Why can't I install matplotlib or pandas with pip OR miniconda? 如何在我的python脚本中包含pip安装的模块? - How can I include a pip installed module with my python script? Atom和Jupyter找不到通过pip / pip3安装的SimPy模块 - Atom and Jupyter can't find SimPy module installed with pip/pip3
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM