Problems installing Python modules

  • Context: Python 
  • Thread starter Thread starter DiracPool
  • Start date Start date
  • Tags Tags
    Modules Python
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
6 replies · 2K views
DiracPool
Messages
1,254
Reaction score
514
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
 
Physics news on Phys.org
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
 
Last edited by a moderator:
jedishrfu said:
Anaconda is a distro of IPython. Its very good everything installs when you install it

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
 
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.

https://docs.continuum.io/anaconda/pkg-docs
 
  • Like
Likes   Reactions: DiracPool
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.
 
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)

http://py.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.
 
  • Like
Likes   Reactions: DiracPool