How to install and run python models using script


#1

Hi, I’m a beginner python programer and I want to be able to run my code inside atom so I downloaded the package “script” however I’m unable to import downloaded models such as praw. So basically does anyone know how to get modules into Atom? Please and thank you.


#2

A common issue is the version of Python that is being run. You can check this with the following Python script

import sys 
print(sys.executable)

If it’s not right, a shebang like #!/usr/bin/env python3 should work.


#3

This is what happens when i run the code


#4

Is that the right version of Python? Do modules import correctly when using that executable to run it in the command line?

You can run that executable in the command line by copying and pasting the whole path, and running it. Then run the help() function, and run either praw or modules. The first will bring up he package docs if it’s installed, the second will make a list of all installed packages you have.