Python Problems installing Python modules

  • Thread starter Thread starter DiracPool
  • Start date Start date
  • Tags Tags
    Modules Python
Click For Summary
The discussion revolves around issues faced after installing Python 3.5.1 and attempting to import modules like numpy, scipy, and matplotlib, which result in "ImportError." The absence of an executable file for numpy installation adds to the confusion. Users express frustration with compatibility issues between Python 2.7 and 3.5, particularly regarding the installation of VPython, which requires Python 2.7. Anaconda is mentioned as a popular distribution that simplifies the installation process by bundling essential packages, making it easier for beginners. It is suggested that uninstalling the current setup in favor of Anaconda could resolve many installation challenges. Additionally, the importance of setting the PYTHONPATH to include the directory where numpy is located is highlighted. The conversation also touches on the use of different development environments, with a recommendation for Processing IDE for a more graphical approach to learning Python. Overall, the consensus leans towards using Anaconda for a smoother experience in getting started with Python and its mathematical modules.
DiracPool
Messages
1,242
Reaction score
515
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
 
Technology 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 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 DiracPool

Similar threads

  • · Replies 8 ·
Replies
8
Views
2K
Replies
3
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 16 ·
Replies
16
Views
5K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 9 ·
Replies
9
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
7K
  • · Replies 8 ·
Replies
8
Views
2K