1

I am running Windows and am a beginner python user trying to install a few modules to run a python script. I have Python 2.7.9 and 3.4.2 both installed to the C:\ directory. I downloaded matplotlib-1.4.3.win-amd64-py3.4.exe and the corresponding .exe for python 2.7 from the Matplotlib website, but when I run the py3.4 exe the program cannot find Python 3.4 to update (Cannot install: Python version 3.4 is required, which is not found in the registry).

Python 2.7 installer works perfectly. Is there a misset PATH variable in Windows I can modify so the .exe can function properly? In CMD 'Python --version' returns Python 3.4, so unsure how to fix the issue. I installed these months ago, and may have put them in Downloads before transferring both to C:\ for clarity, which may be the problem but am unsure how to fix it.

Also, if your answer involves pip in any way please clarify how exactly to use pip in Windows. A lot of websites say to run eg. 'pip setup.py install' in the 'terminal' but do not specify if they mean Windows CMD terminal, IDLE GUI, or Python.exe command-line interface. Thanks a lot!

user111111
  • 41
  • 4
  • Check this answer: http://stackoverflow.com/a/14407505/296460 also python 3.4 should come with pip already. – shuttle87 Jul 18 '15 at 02:26

1 Answers1

0

Not the answer to your actual question, but some clarification on your last point:

but do not specify if they mean Windows CMD terminal, IDLE GUI, or Python.exe command-line interface.

Yes, this requires to know some context that a beginner may not have. The command pip is always used in the CMD terminal. So open CMD, and enter

pip3 install matplotlib

Notes:

  • Use pip3 when installing for Python 3. Then you're certain you're not accidentally installing libraries for Python 2.

  • pip setup.py install does not exist. You're mixing up two mechanisms to install Python packages/libraries:

    • One uses pip, with aforementioned pip3 install <something>. Pip goes looking online, finds a corresponding package name in a database, retrieves the URL for that package, downloads the package and installs the package. All in one command.

    • python3 setup.py install (again explicitly use python3 or python2 to be sure) requires you to find the package, download it, unzip it, and then in the CMD terminal, inside the unzipped folder, run the python3 setup.py install command.

    This second method is usually for the latest-greatest version of a package that is not yet in pip's database, or for packages that never were in pip's database in the first place.

Generally, as a beginner, you want to stick with pip. If you ever run into the issue with the package not being available via pip, you may still be able to use pip for downloading and installing, like for example so:

pip install https://github.com/matplotlib/matplotlib/archive/master.zip

which would install the most recent matplotlib (which won't have even a version number yet, so bugs could be around).

All of these commands happen in the CMD terminal: downloading/installing packages generally all go through the terminal.

Also, when people mention "terminal", they will mean (for Windows) something like the CMD terminal. When it has to be done inside Python, it is generally called the "Python prompt". (IDLE is yet a different beast, that I'm not familiar with. I'm guessing that it has several parts, including a text editor section and a Python prompt section.)