I have Windows Vista and am running Python 2.7. I am having trouble installing some Python libraries including, NumPy, SciPy, and pygame. I am currently trying to copy the NumPy file straight to my computer (C:\numpy) and then unziping the file there. In a command prompt I then run the code;
cd c:\numpy
python setup.py config
python setup.py install
When I get to the "python setup.py config" part, the command prompt says "this is the wrong setup.py file to run"
Any suggestions?
This is the ANSWER for installing numpy on Windows 8 64 bit.
All you need is:
1.Python, installed in your system, in my case its c:\Python27, its 2.7 version.
2.Install pip if not available.
download "numpy-1.9.2+mkl-cp27-none-win_amd64.whl" file for 64 bit, you can find this here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
if you don't find it there use mine at: https://github.com/pawanputtaswamy/Libs
How to install:
1.open command prompt (Windows + r and type cmd)
2.Go to pip directory, in my case (cd c:\Python27\Scripts\pip.exe)
3.Run the following command: pip.exe install \numpy-1.9.2+mkl-cp27-none-win_amd64.whl
Done
Numpy, Scypy and pygame all have windows installers; You are advised to use these installers in favor of archive versions. Make sure you match the version (3.2, 2.7) and archetecture (i386 or x86_64) as the python binary you have installed.
Alternatively, depending on your time constraints and situation you could use Enthought's prepackaged python distribution for Windows. The free version:
http://www.enthought.com/products/epd_free.php
has everything you need except pygame which you should be able to install with easy_install once everything else is in place.
Open the Python shell and input as such:
>>> import pip
>>> pip.main(["install","numpy"])
In fact,the method of installing numpy is very easy and quick.First,make sure that Python has already been installed.Then,download the numpy module on sites,such as
http://sourceforge.net/projects/numpy/files/NumPy/, which provides the numpy module for python2.6.
Finally,double click the module,the rest you have to do is just let it go on.and,it will be installed naturally.
Just go here http://continuum.io/downloads and download the graphical installer.
It will install Numpy, Scipy and a tonne of other useful stuff.
This is a screenshot that can help, Note that I use Ubuntu as operating System
Related
I want to use "tkinter", "opencv" (cv2) and "numpy" in windows(8 - 64 bit and x64) with python2.7 - the same as I have running perfectly well in Linux (Elementary and DistroAstro) on other machines. I've downloaded the up to date Visual Studio and C++ compiler and installed these, as well as the latest version of PIP following error messages with the first attempts with PIP and numpy
first I tried winpython, which already has numpy present but this comes without tkinter, although openCV would install. I don't want to use qt.
so I tried vanilla Python, which installs to Python27. Numpy won't install with PIP or EasyInstall (unless it takes over an hour -same for SciPy), and the -.exe installation route for Numpy bombs becausee its looking for Python2.7 (not Python27). openCV won't install with PIP ("no suitable version")
extensive searches haven't turned up an answer as to how to get a windows Python 2.7.x environment with all three of numpy, tkinter and cv2 working.
Any help would be appreciated!
Finally did it with .whl files. Download them, copy to C:\python27\Scripts and then open "cmd" and navigate to that folder with "cd\" etc. Once there run:
pip install numpy-1.10.1+mkl-cp27-none-win_amd64.whl
for example.
In IDLE I then get:
import numpy
numpy.version
'1.10.1'
small remark: WinPython has tkinter, as it's included by Python Interpreter itself
I'm really new to coding, programming, Python, and just computers in general, so I need some help with Canopy. I've been having pretty consistent troubles installing any packages to Canopy; some stuff is in the internal package manager,but whenever it isn't, it's really confusing. I guess I'll list a specific installation.
I'm trying to install "pywcs" (link provided below) to my Win7 64-bit machine. I have Cygwin if that helps at all. I do not know how to go about this; the stuff I found online is pretty confusing, and Cygwin easy_install (filename) never seems to work. Any step-by-step solutions?
The way I installed astropy is as follows.
Open Windows Terminal
Change Directory to C:\Users\<USER NAME>\AppData\Local\Enthought\Canopy32\User\Scripts
Type easy_install.exe astropy
Wait until the download completes, and restart Enthought.
sometimes installing packages can be hard for enthought canopy . You could install all python packages using pip install mrjob command on the its own canopy command prompt
Go to tools tab on the canopy editor ,
Left click on the canopy command prompt ,
Finally pip install <package name> and hit Enter key
The key point is that in order to install a package into any Python distribution (including Canopy Python), you should use that Python to perform the installation. You refer to Cygwin's "easy_install", but you should instead use Canopy's easy_install.
As described in this article, the easiest way to be sure that you are running Canopy's Python (and Canopy's easy_install) is to have Canopy Python on your PATH. This is done by default during Canopy installation, but if you uncheck this option then, or if your Cygwin installation doesn't use your Windows PATH, then you will need to adjust your Cygwin PATH accordingly.
Doing as Sukrit suggests, and running the installation from the Canopy Python Scripts directory, is also a reasonable approach.
Alternatively, depending on its compiler dependencies, you may be able to install astropy from a Windows Command Prompt rather than from Cygwin (of course Canopy must be on the PATH here too, as it would be by default.)
In Linux you can do it as follows.
1) Make sure you are using the Canopy version of Python - check out https://support.enthought.com/entries/23389761-Installing-packages-into-Canopy-User-Python-from-the-command-line
2) At the command prompt use easy_install, for example:
$ easy_install pp==1.5.7
to install version 1.5.7 of pp
Just for information, Astropy is now included by default in Enthought Canopy:
https://www.enthought.com/products/canopy/package-index/
I have installed Numpy successfully. But on the site , there is lot of things that I have to do such as building Numpy, Scipy, downloading ATLAS, LAPACK etc. I am really confused and even I have checked some of the other queries also. Still not able to understand.
Can anyone please explain me what exactly should I do? I have cygwin installed on my pc.
How to buid Numpy? whats the use of building numpy?
How to install Scipy?
Whats ATLAS, LAPACK etc etc ?
Thank you so much(in advance).
I struggled with the same problem for a long time, and I eventually found an easy solution here`
You really should try Enthought Python Distribution. Just a single msi installation file, click a few Next and then you are done. They include lots of scientific packages in it, including numpy, scipy, matplotlib, etc., and also ipython environment.
Would WinPython an option for you?
Unless necessary, I'd see if that covers my needs
I did the following to get Scripy installed on my Windows virtualenv:
I downloaded the file here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy and then selected the file: numpy-1.11.1+mkl-cp27-cp27m-win32.whl
. The file is applicable to me as I'm running Python 2.7 and I have a win32 machine. You can check this information on your side by running python in your cmd prompt. Mine says:
Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win32
The reason why we download numpy first is because scipy relates on it. Under scipy on the same website: http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy, it says:
Requires numpy+mkl.
Install numpy+mkl before installing scipy.
Download the applicable scipy file for you, mine was this one: scipy-0.18.0-cp27-cp27m-win32.whl
Now, you can dump them into the root of your virtualenv folder. Send the following commands in your virtualenv:
pip install numpy-1.11.1+mkl-cp27-cp27m-win32.whl
pip install scipy-0.18.0-cp27-cp27m-win32.whl
Scipy will then install successfully.
the easiest way is in the following steps:
Fixing scipy for python [ 2.n < python < 3.n ]
Download the necessary files from: http://www.lfd.uci.edu/~gohlke/pythonlibs/
Download the version of numpy+mkl (needed to run scipy) and then download scipy for your python type (2.n python written as 2n) or (3.n python written as 3n), n is a variable. Note you must know whether you have a 32bit or 64bit processor.
Create a directory somewhere on your computer, example [C:\DIRECTORY] to install the files numpy+mkd.whl and scipy.whl
Once both file are downloaded, find the location of the file on your computer and move it to the directory you created.
Example: first file installation is needed for scipy is in---> C:\DIRECTORY\numpy\numpy-0.0.0+mkl-cp2n-cp2nm-win_amd32.whl
Example: second file installation is in---> C:\DIRECTORY\scipy\scipy-0.0.0-cp2n-cp2nm-win_amd32.whl
Go to your command prompt and proceed the following example for a python version 2.n:
py -2.n -m pip install C:\DIRECTORY\numpy\numpy-0.0.0+mkl-cp2n-cp2nm-win_amd32.whl
should install
py -2.n -m pip install C:\DIRECTORY\scipy\scipy-0.0.0-cp2n-cp2nm-win_amd32.whl
should install
Test both modules on your python IDLE as following:
import numpy
import scipy
the modules are working if no errors are returned.
IFDAAS
I cannot figure out how to install pyopencl with Cygwin. Never used Cygwin before so I am very lost as to how I initiate python and use it to run my .py setup files.
You said, you want to install pyopencl without cygwin on windows, right?
There we go:
In case of you need 32-Bit version, download win32 Packages.
Download Python 2.7.5 Windows X86-64 Installer from http://www.python.org/download/ and install python (you rather install it in C:\Python27)
Go to http://www.lfd.uci.edu/~gohlke/pythonlibs/
Download numpy, scipy, pyopencl and install them
Go to pypi.python.org/pypi/pytools and download pytools.
Extract the file (using i.e. WinRAR) or tar (tar cxvf my.tar.gz)
Open commandline aka Dos (cmd.exe) and go in cmd to the folder you have extracted pytools by using cd command
Enter in cmd: python setup.py install
Open Python IDLE or simply type python in cmd and type import pyopencl
There should be no errors. If so, you did well.
Did you install Python into Cygwin?
If not, launch setup.exe, get to the packages screen, and do a search for python.
You can install 2.6.8 and 3 side by side if you want.
After that it's like using python anywhere else. You can do a $ python my.py to run my.py. You can install easy_install or pip, etc. if they'll help. Otherwise, follow the directions for PyOpenCL and you should be good!
I have Python 2.7, and I have distutils installed.
I downloaded the latest version of Scipy for win 32.
For the life of me, I do not understand how to install it.
From the directions on the site, it states:
If you already have Python installed, the easiest way to install Numpy
and Scipy is to download and install the binary distribution from
Download.
I have followed the above directions and downloaded this.
I cannot figure what to do now!
How do I finish getting scipy installed?
It looks like you've downloaded the source distribution, which you would normally install by doing:
python setup.py install
However, without the proper C compiler environment and other libraries, it will probably fail. I'm guessing you really wanted to download the Windows binaries .
You have to drill a little further down in the sourceforge site to find it.
try downloading the windows binary ...
http://sourceforge.net/projects/scipy/files/scipy/0.11.0/scipy-0.11.0-win32-superpack-python2.7.exe/download
You'll be well off installing setuptools. Makes installing almost anything python-related a breeze!
e.g.
easy_install scipy
There's another one called pip.
easy_install pip
pip install scipy
just open windows command prompt and go to the directory you have installed Python. e.g
c:\python34>
Once there, just type python -m pip install scipy and press enter