Problems installing Python modules

  • Context: Python 
  • Thread starter Thread starter DiracPool
  • Start date Start date
  • Tags Tags
    Modules Python
Click For Summary

Discussion Overview

The discussion revolves around issues related to installing Python modules, specifically numpy, scipy, and matplotlib, as well as the differences between standard Python installations and the Anaconda distribution. Participants express confusion over compatibility issues between Python versions and seek guidance on how to set up their programming environment effectively.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant reports successfully installing Python 3.5.1 but encounters "ImportError" messages when trying to import numpy and other modules, expressing confusion about the installation process.
  • Another participant suggests setting the PYTHONPATH to include the directory where numpy is located as a potential solution.
  • Several participants discuss Anaconda, describing it as a distribution of IPython that simplifies the installation of packages and includes a web-based development environment.
  • There is a suggestion to uninstall existing installations in favor of Anaconda, with some uncertainty about whether this is a good strategy.
  • One participant expresses frustration with the complexity of the installation process and compatibility issues between Python 3.5 and 2.7, questioning which version to use for learning.
  • A suggestion is made to try the Processing IDE, which offers a graphical way to experiment with Python, while also reiterating the importance of setting PYTHONPATH.
  • Another participant mentions the preference for using Anaconda due to its comprehensive package installations and the ongoing transition from Python 2 to 3.

Areas of Agreement / Disagreement

Participants express a range of views on whether to use Anaconda or stick with a standard Python installation. There is no consensus on the best approach to resolve the installation issues, and multiple competing views remain regarding the use of different Python versions.

Contextual Notes

Participants highlight limitations related to compatibility between Python versions and the complexity of the installation process, which may depend on individual setups and specific use cases.

Who May Find This Useful

Individuals new to Python programming, particularly those interested in scientific computing and data analysis, may find this discussion relevant as it addresses common installation challenges and environment setup considerations.

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

Similar threads

Replies
3
Views
2K
  • · Replies 8 ·
Replies
8
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
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
7K
  • · Replies 2 ·
Replies
2
Views
6K