简体   繁体   中英

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. I successfully installed matplotlib with Anaconda Prompt. My text editor Atom gives me a ModuleNotFoundError when I attempt to import matplotlib. Why isn't Atom able to find matplotlib after I installed it with Anaconda Prompt? matplotlib is located in Miniconda3 > Lib > 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."

Am I having issues because python was installed as part of Miniconda? Why can't I pip install with Command Prompt, and only with Anaconda prompt? Why can't Atom find my Anaconda Prompt-installed matplotlib?

I am new to programming and 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.

If you loaded python using Anaconda you should use conda instead of 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. Some conda commands are listed here . To create vitual environments follow instructions here .

Go to the terminal window and type conda install numpy, for example, to install numpy. If you're not on a Mac use the PowerShell or equivalent to the terminal for mac to run Unix-like commands. Use same window as you were using for pip.

Conda is a package manager and you can read more about it here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM