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
Related
I am having a strange issue installing numpy or nltk python-modules in my windows-7 machine. I have successfully installed Python 2.7.12 but I get this error when I type pip install numpy as in this screenshot. I have also included the directory of pip.exe in the PATH. Any help would be appreciated.Thank you :)
Installing such these things in windows are sometime difficult, specially for someone new to python packages(also for some experts!)
Try to use Anaconda for windows: https://www.continuum.io/downloads#_windows
This install a python for you and many requirement packages(e.g Numpy, Scipy, Scikit and many more)
You can use older version of Anaconda, for python2.x if you want strictly python2.x
An alternative way is to download Numpy from github and then install it as a python package, that contain setup.py file
python setup.py install
Or you can download Numpy wheel package, then install it localy with pip
I've been spending hours on this. I'm new to Python and can't see what the solution may be.
I have Python 3.4 and want to work with .docx, which requires lxml.
The workflow I've done so far is: I go to the Python lxml package installer page, but it's quite confusing to know which version I need. I tried with several of them that contained the 34 numbers, both .exe and .tar. I also tried pip install lxml3.4.4 and pip install lxml 3.4.4. None of them worked either.
This is what the command prompt says when I did pip install lxml (it automatically grabs the lxml 3.4.4 I've downloaded and then prints what you can see in the screenshot):
What am I doing wrong and what can I do to repair it? And/or what exact version of lxml do I need to install from where? I am really discouraged that this is so difficult. Thanks
As said at the lxml homepage, it happened to you:
If you fail to build lxml on your MS Windows system from the signed and tested sources that we release, consider using the binary builds from PyPI or the unofficial Windows binaries that Christoph Gohlke generously provides.
So you have to download the right wheel file from Unofficial Windows Binaries for Python Extension Packages.
Step 1: Download appropriate version
Depending on your machine you have to download the wheel file lxml‑3.4.4‑cp34‑none‑win32.whl or lxml‑3.4.4‑cp34‑none‑win_amd64.whl, because you want the version for Python3.4 (that's the 34 in cp34).
Step 2: Open cmd and navigate to the download folder
I have chosen to open the cmd in administrator mode. But this is probably not necessary for you.
Step 3: Install wheel file with pip
Now you have to install the unofficial wheel file with pip. Maybe you can do pip install pip --upgrade before you install the wheel file. But this is probably also not necessary for you. To do the installation, just type pip install <downloaded_file>.
Or as cgohlke mentioned in his comment to your question: If you can't do pip install in cmd directly, this is what you can try: C:\Python34\python.exe -m pip install <downloaded_file>. You have to edit the path if Python3.4 is installed elsewhere, of course.
Don't panic. If you try to install the wrong downloaded file (e. g. win32 instead of amd64), it shouldn't break anything. An error message should occur: <package name> is not a supported wheel on this platform.
I have both Python 2.7 and Python 3.4 (and have to have both because for the class I'm running, students have the option of using either). One student has used Python 2.7 and numpy for their project, but when I attempt to install numpy, it installs it to 3.4. I need to install it to 2.7.
I'm using numpy 1.9 from this site, which I'm told is also 2.7-specific: http://sourceforge.net/projects/numpy/files/NumPy/
However, nonetheless it still goes to the 3.4 folder. Copying it to Python 2.7 didn't work, obviously.
How do I do this?
I recommend installing with pip.
pip install numpy
If this doesn't work on windows then download the binary from http://www.lfd.uci.edu/~gohlke/pythonlibs/ and convert it to a wheel before installing.
pip install wheel
wheel convert path/to/binary
pip install numpy_wheel
Pip is recommended because you can uninstall.
To check where you are installing to
pip -V
You may have an environmental variable path to the wrong pip.
Assuming that you are using, or at least you should use pip to install the library. You can specify the python version to be installed by changing the suffix, e.g. pip-2.7 install numpy.
pip install numpy
pip-2.7 install numpy
pip-3.4 install numpy
As an alternative, in case that you do not want to use pip is to download and install the library using setup with a similar technique.
python setup.py install
python2.7 setup.py install
python3.4 setup.py install
Your PATH isn't setup correctly.
C:> where pip
Should tell you which pip it is trying to use, and it is likely whichever one it found on your PATH first...
So, instead, you will want to run it as
C:> C:\mypython2install\pip.exe install numpy
Or, setup your path correctly. See here
Just one other note on issues like this. I had a similar problem with Python 2.7 libraries not being found, because I had miniconda installed for a Python virtual environment that was hijacking calls to python from other programs. After deleting the minconda directory in my home the problem went away and python libraries that were properly installed were found again.
Note-This answer is particularly for Windows PC which has both Python2 & Pyhton3 installed on it.
Both the versions of Python has their different directories somewhat like
"C:\Python27\" ----for python2
"C:\Python35\" ---- for python3
*(or it depends on what path you chose while installing Python**)*
pip GENERALLY exist under the directory "C:\Python**\Scripts"
there you can find exe files like:
pip.exe/pip2.exe/pip2.7.exe ----for python2
pip3.exe/pip3.5.exe ----for python3
to install packages on python2:
use
Python27\Scripts\pip2.exe install package_name
(where the 1st argument is the path of exe file, it might differ for your system)
to install packages on python3:
use
Python35\Scripts\pip3.exe install package_name
there is no need to uninstall any version of python to achieve the task.
I am trying to install OpenMDAO, which is an open source framework that uses python. So before I get to it, it needs 3 packages:
Fortran Compiler
NumPY
ScyPy
Which I did install using homebrew:
brew install gfortran
sudo easy_install-2.6 pip
sudo pip-2.6 install numpy
sudo pip-2.6 install scipy
Now, to install OpenMDAO, I'm supposed to be in the OpenMDAO folder and at that level I should run this script:
python go-openmdao-dev.py
But I keep getting this error:
ERROR: the following prerequisites could not be imported: ['scipy'].
So I was talking to the people at OpenMDAO, and it seems that I need to use is python2.6 - although I'm not certain, so my guess is that all the packages I installed are for python 2.7 which I downloaded since it was recommended in the python website.
The one that comes with Mac was not. So when I type in terminal the following:
python2.6
It actually runs that version. So at this point I don't know if I have to go run the script in python 2.6, but if so, I have no idea how to do it. I tried doing this and it did not work:
If anyone is familiar with the environment or just with python itself and has any suggestions, I'll really appreciate it.
This question was answered on the OpenMDAO support forum:
http://openmdao.org/forum/questions/744/error-the-following-prerequisites-could-not-be-imported-scipy
The solution was to install scipy and numpy for python2.7. The original poster first installed them for python2.6, but then ran the go-openmdao.py script with python2.7. Once all the pre-reqs were installed for 2.7, it worked.
I had the same problem after downloading scipy from a .dmg. I uninstalled, and then reinstalled from source: http://sourceforge.net/projects/scipy/files/scipy/0.12.0/ and then the openmdao installer recognized scipy.
This may be useful (from INSTALL.txt in scipy-0.12.0.tar.gz):
To test SciPy after installation (highly recommended), execute in
Python
>>> import scipy
>>> scipy.test()
To run the full test suite use
>>> scipy.test('full')
Please note that you must have version 0.10 or later of the 'nose'
test framework installed in order to run the tests. More information
about nose is available on the website__.
__ http://somethingaboutorange.com/mrl/projects/nose/
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