Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Python Problems installing Python modules

  1. Apr 12, 2016 #1
    I've installed Python 3.5.1 successfully, and I've downloaded add-on modules such as numpy, scipy, matplotlib, etc, but when I try to import them into python I get the following: "ImportError: No module named 'numpy'", etc.

    There's no executable file in the numpy download to activate anything, so I'm stumped as to what to do. This is all very confusing. Plus, when I try to install VPthyon, it tells me I have to install the older version of python 2.7.

    Then there's this thing called "Anaconda" I keep running into that seems popular but I don't know how it's different than the regular Python. All I want to do is get Python up and running on my computer with the appropriate math modules so I can start learning how to program. Nothing fancy. Can someone provide some guidance? Thanks
  2. jcsd
  3. Apr 12, 2016 #2


    Staff: Mentor

  4. Apr 12, 2016 #3


    Staff: Mentor

    Anaconda is a distro of IPython. Its very good everything installs when you install it. It uses the IPython Notebook web page for developing your code and it can run IJulia for Julia numerical programming.

    Here's more on this distro:

    http://www.quant-econ.net/py/getting_started.html [Broken]
    Last edited by a moderator: May 7, 2017
  5. Apr 12, 2016 #4
    Should I just uninstall everything I have so far and install Anaconda? It looks as if you do this, then you can just install the "SciPy stack" on top of this: https://www.scipy.org/install.html
  6. Apr 12, 2016 #5


    Staff: Mentor

    I don't know. It seems like a good strategy but I've never tried it. However, since you're just starting out I don't think it will break stuff on your machine and Anaconda will install properly so things should work out of the box.

    Also I thought anaconda came with the scipy stack too.

  7. Apr 12, 2016 #6
    This has been a very frustrating experience so far. There's too many independent moving parts in this environment and compatibility issues for a beginner like me to navigate. I'm watching tutorials and following instructions and very few things are installing correctly. Plus, the backwards compatibility from Python 3.5 to 2.7 is not good. So running 3.5 and watching a tutorial in 2.7 is pretty much useless for me because the syntax has been changed.

    What should I do? Should I use 3.5 or 2.7? It seems that I can't even use VPython at all unless I'm running 2.7.
  8. Apr 12, 2016 #7


    Staff: Mentor

    Well one idea is to try Processing IDE. It has a python mode where you can experiment with python in a graphical way. (processing.org)


    Did you try the PYTHONPATH setting I mentioned initially?

    Personally I use a programmers editor like vi/vim or atom to do my development and then run my code from the commandline.

    With anaconda you run your code from a web page and the results appear back in the web page. It's a nice environment and personally I would stick with it as it comes with everything important already installed. You should choose whether you want to develop in Python 2 or 3 mode. I would think you want Python 3 as Python 2 will slowly disappear as 3 takes over but things change so who knows there's been enough resistance to 3 that they've had to backport some features to 2 to keep things moving along.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted