How to install Python Modules


Hi, I’m a very novice Python programmer and I just started Atom to run some data analysis. I am going to need to create arrays with the NumPy module and the Matplotlib module, but I can’t seem to get it to run. Does anyone know how to get these modules into Atom? Please and thank you.



You don’t get Python modules into Atom, because Atom doesn’t have any capability to run code that isn’t JavaScript. You will have Python installed on your system in some form (Python 2, Python 3, Anaconda, Jupyter, etc.) and the package that you choose will relay the code to the actual Python binary, which will spit out the results.

If you explain a bit more about what you want, I can help you figure out what you want to use.



For a moment…
remove the text editor Atom from the equation.

Which version of Python do you have installed?
If your friend sent you a piece of code, will you be able to run the code?



Hello, these two packages that you mentioned are 3rd party python packages and you need to install them separately.
i suggest using pip (a python package manager)



I use Python 3



Have you installed numpy and matplotlib?



Hi, I have the same problem. I have Anaconda. but I sill don’t know how to import python packages in Atom. I followed some guideline about installing pip and installing pandas, but still I don’t have a clue.

Could you please help me?



You don’t import packages in Atom. You import packages in your script. Atom has nothing whatsoever to do with running Python. You can download packages that can send your script to the Python interpreter you have installed on your computer, and that works exactly like the python command from your system’s command line. If you have installed a package and used it successfully, but it doesn’t recognize a package you have installed, that means that you have multiple versions of Python installed on your computer. You can run python --version and compare the results between your system’s terminal and a terminal package inside Atom (termination is the easiest to start with), and then you can run a Python script that prints the global variable sys.path in both places to compare the paths being searched for modules. If you provide me with the output of those commands, I can tell you more information about how you have configured your computer.