I downloaded the scipy package as wheel, the last version for windows 64 bits scipy-0.18.1-cp36-cp36m-win32
when i use
pip install scipy-0.18.1-cp36-cp36m-win64.whl
this command display
numpy-1.12.0b1+mkl-cp36-cp36m-win64.whl is not a supported wheel on this platform.
what is the problem?
1) To get precompiled packages for Windows, have a look at Gohlke's Unofficial Windows Binaries or use a distribution like Winpython (just works) or Anaconda (more complex) which provide an entire preconfigured environment with lots of packages from the scientific python stack.
2) Installing with pip
You can install the numpy and scipy wheels on Windows with pip in one step if you use the appropriate link from Gohlke's Unofficial Windows Binaries (mentioned by sebix) and run the Windows command prompt as Administrator. For example, in Python 3.5, you would simply use something like this:
# numpy-1.9.3+mkl for Python 3.5 on Win AMD64
pip3.5 install http://www.lfd.uci.edu/~gohlke/pythonlibs/xmshzit7/numpy-1.9.3+mkl-cp35-none-win_amd64.whl
# scipy-0.16.1 for Python 3.5 on Win AMD64
pip3.5 install http://www.lfd.uci.edu/~gohlke/pythonlibs/xmshzit7/scipy-0.16.1-cp35-none-win_amd64.whl
or you can look here -> https://www.scipy.org/install.html
If all else fails, try using Python(x,y) - a scientific distribution of Python which comes with scipy bundled.
Related
I've already installed numpy 1.9.0 in Python.Now what should I do to get numpy+mkl?
If you do not have an entire Python distribution or you do not want to install one, you can download and install a compiled whl package from Christoph Gohlke's webpage. This whl contains numpy and is linked against mkl. When installing this package, you install both: numpy with the mkl dependencies.
All you have to do is:
download the correct whl file (Choose the right Python version and 32/64 file)
open a Windows cli with Windows+R and by running inside cmd
go to the directory where you have downloaded the whl file, with cd instructions
run pip install numpy‑1.XX.Y+mkl‑cp3X‑cp3Xm‑win_amd64.whl
For example, the command can be
pip install numpy‑1.11.3+mkl‑cp35‑cp35m‑win_amd64.whl
You can do it for any package with some code that has to be compiled
The easiest way is to install an entire Python distribution with lots of included packages, such as numpy and mkl. I would suggest the Anaconda Python distribution, https://www.continuum.io/downloads
The above answer does great (+1) and brought me on the right track, but to
clear things up even more:
You can download the .whl from here
For choosing the right .whl you need to know numpy‑1.11.3+mkl‑cpXX‑cpXXm‑win_amd64.whl
where the XX are actually your python version (e.g. 36 for python version 3.6.x)
Do pip install numpy‑1.11.3+mkl‑cp**XX**‑cp**XX**m‑win_amd64.whl in your cmd window and the place where you did download the .whl into
I found out that it's impossible to install NumPy/SciPy via installers on Windows 64-bit, that's only possible on 32-bit. Because I need more memory than a 32-bit installation gives me, I need the 64-bit version of everything.
I tried to install everything via Pip and most things worked. But when I came to SciPy, it complained about missing a Fortran compiler. So I installed Fortran via MinGW/MSYS. But you can't install SciPy right away after that, you need to reinstall NumPy. So I tried that, but now it doesn't work anymore via Pip nor via easy_install. Both give these errors:
There are a lot of errors about LNK2019 and LNK1120,.
I get a lot of errors in the range of C: C2065,C2054,C2085,C2143`, etc. They belong together I believe.
There is no Fortran linker found, but I have no idea how to install that, can't find anything on it.
And many more errors which are already out of the visible part of my cmd-windows...
The fatal error is about LNK1120:
build\lib.win-amd64-2.7\numpy\linalg\lapack_lite.pyd : fatal error LNK1120: 7 unresolved externals
error: Setup script exited with error: Command "C:\Users\me\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\BLAS /LIBPATH:C:\Python27\libs /LIBPATH:C:\Python27\PCbuild\amd64 /LIBPATH:build\temp.win-amd64-2.7 lapack.lib blas.lib /EXPORT:initlapack_lite build\temp.win-amd64-2.7\Release\numpy\linalg\lapack_litemodule.obj /OUT:build\lib.win-amd64-2.7\numpy\linalg\lapack_lite.pyd /IMPLIB:build\temp.win-amd64-2.7\Release\numpy\linalg\lapack_lite.lib /MANIFESTFILE:build\temp.win-amd64-2.7\Release\numpy\linalg\lapack_lite.pyd.manifest" failed with exit status 1120
What is the correct way to install the 64-bit versions NumPy and SciPy on a 64-bit Windows machine? Did I miss anything? Do I need to specify something somewhere? There is no information for Windows on these problems that I can find, only for Linux or Mac OS X, but they don't help me as I can't use their commands.
You can install scipy and numpy using their wheels.
First install wheel package if it's already not there...
pip install wheel
Just select the package you want from http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy
Example: if you're running python3.5 32 bit on Windows choose scipy-0.18.1-cp35-cp35m-win_amd64.whl then it will automatically download.
Then go to the command line and change the directory to the downloads folder and install the above wheel using pip.
Example:
cd C:\Users\[user]\Downloads
pip install scipy-0.18.1-cp35-cp35m-win_amd64.whl
EDIT: The Numpy project now provides pre-compiled packages in the wheel format (package format enabling compiled code as binary in packages), so the installation is now as easy as with other packages.
Numpy (as also some other packages like Scipy, Pandas etc.) includes lot's of C-, Cython, and Fortran code that needs to be compiled properly, before you can use it. This is, btw, also the reason why these Python-packages provide such fast Linear Algebra.
To get precompiled packages for Windows, have a look at Gohlke's Unofficial Windows Binaries or use a distribution like Winpython (just works) or Anaconda (more complex) which provide an entire preconfigured environment with lots of packages from the scientific python stack.
Installing with pip
You can install the numpy and scipy wheels on Windows with pip in one step if you use the appropriate link from Gohlke's Unofficial Windows Binaries (mentioned by sebix) and run the Windows command prompt as Administrator. For example, in Python 3.5, you would simply use something like this:
# numpy-1.9.3+mkl for Python 3.5 on Win AMD64
pip3.5 install http://www.lfd.uci.edu/~gohlke/pythonlibs/xmshzit7/numpy-1.9.3+mkl-cp35-none-win_amd64.whl
# scipy-0.16.1 for Python 3.5 on Win AMD64
pip3.5 install http://www.lfd.uci.edu/~gohlke/pythonlibs/xmshzit7/scipy-0.16.1-cp35-none-win_amd64.whl
Best solution for this is to download and install VCforPython2.7 from https://www.microsoft.com/en-us/download/details.aspx?id=44266
Then try pip install numpy
Downloading the binaries for 64-bit from http://www.lfd.uci.edu/~gohlke/pythonlibs/, and installing it directly with pip in this order:
pip install numpy-1.12.0+mkl-cp36-cp36m-win64.whl
pip install scipy-0.18.1-cp36-cp36m-win64.whl
pip install matplotlib-2.0.0-cp36-cp36m-win64.whl
Note that you must place command prompt in the folder where you put the .whl files after downloading them, and you must run it as administrator,
worked for me on Windows 10 64-bit now python is up and running.
You can now pip install numpy on Windows!
"Note: this page has only historical relevance, you can now pip-install for windows"
Source: https://github.com/numpy/numpy/wiki/Whats-with-Windows-builds
Intel provides pre-compiled Python modules for free in their "Intel Distribution for Python". The modules are compiled against Intel's MKL (Math Kernel Library) and thus optimized for faster performance. The package includes NumPy, SciPy, scikit-learn, pandas, matplotlib, Numba, tbb, pyDAAL, Jupyter, and others. Find more information and the download link here
If you are on windows , you wouldn't need wheel anyway! You can directly install package by downloading the 32-bit package as win32 from this link [http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy] and then move that downloaded package to cmd's current directory and open cmd and write following codepip install numpy-1.13.1+mkl-cp36-cp36m-win32.whl then do it same for scipy
For 64-bit you need to install mingw-w64 as it is gcc and compiles numpy and scipy as precompiled status.
Currently it works fine with 32-bit.So I had opted for win32 package both for numpy+mkl and scipy in that link.
Hope This works! Give a try
You can download the needed packages from here and use pip install "Abc.whl" from the directory where you have downloaded the file.
Look into python wheels to solve your problem. The best part of python wheels is that they let you install C extensions with no compilers. I just installed numpy and scipy using pip in a clean python install and they both worked fine.
for python 3.6, the following worked for me
launch cmd.exe as administrator
pip install numpy-1.13.0+mkl-cp36-cp36m-win32
pip install scipy-0.19.1-cp36-cp36m-win32
Package version are very important.
I found some stable combination that works on my Windows10 64 bit machine:
pip install numpy-1.12.0+mkl-cp36-cp36m-win64.whl
pip install scipy-0.18.1-cp36-cp36m-win64.whl
pip install matplotlib-2.0.0-cp36-cp36m-win64.whl
Source.
Hey I had the same issue.
You can find all the packages in the link below:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#scikit-learn
And choose the package you need for your version of windows and python.
You have to download the file with whl extension. After that, you will copy the file into your python directory then run the following command:
py -3.6 -m pip install matplotlib-2.1.0-cp36-cp36m-win_amd64.whl
Here is an example when I wanted to install matplolib for my python 3.6 https://www.youtube.com/watch?v=MzV4N4XUvYc
and this is the video I followed.
Follow these steps:
Open CMD as administrator
Enter this command : cd..
cd..
cd Program Files\Python38\Scripts
Download the package you want and put it in Python38\Scripts folder.
pip install packagename.whl
Done
You can write your python version instead of "38"
I have installed the Enthought Python Distribution (i.e. python 2.7) on a Ubuntu 12.04 virtual machine and it would be very useful if it could recognise modules imported via the synaptic package manager. Currently, these are only recognised by the system-provided python installation (quite understandably). Since both pythons are 2.7, is it possible to make my EPD installation recognise the system modules? Thanks.
No, using synaptic-installed modules with EPD is not supported. Of course, you can try adding specific packages to your PYTHONPATH, but this is likely to create conflicts, especially for modules containing C-extensions that may be linked against a slightly different version of Python.
Currently, the recommended way to install python packages in EPD is with the enpkg tool. Try enpkg -s <packagename> to see if your desired package is in Enthought's repository. If you haven't already, you should upgrade enpkg itself by running enpkg enstaller and enter your EPD credentials by running enpkg --userpass. Then you should be able to install supported packages with enpkg <packagename> (Using enpkg to update EPD packages).
If the package you're looking for isn't in Enthought's repository, you can install pip with enpkg pip and install packages in EPD with that tool.
Alternately, you can download the source for your desired package and install it with python setup.py install, assuming the package has a setup.py.
Note: if you install a package into EPD without using enpkg, you should make sure to remove the EPD version of the package first if it exists (enpkg --remove <packagename>). If you later choose to install the package with enpkg, you should first remove the version you installed with an alternate method (Using non-EPD package installers such as pip).
There is also an upcoming GUI package manager from Enthought, currently in Beta.
Had the same problem.Enthought distribution uses completely different python paths and library prefix than your run of the mill system distribution. So if you use pip, pip will install on your system path, not your EPD path.
Solution:
1) get your EPD prefix with: enpkg --path
2) write it down somewhere
3) if you pip install then type:
pip install --install-option="--prefix=$PREFIX_PATH" package_name
as written by Ian Bicking on Install a Python package into a different directory using pip?.
The previous answer might be obsolete. On version 4.6.3 use enpkg --env to get the prefix
$ enpkg --version
enstaller version: 4.6.3
$ enpkg --env
I have Python 2.7 and NumPy installed. I have downloaded pre-built binaries for SciPy, but the install script fails with this error:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
I really don't know enough about this to fool with it. I assumed it was a straightforward install process, but doesn't appear to be. I googled for the BLAS environment variable, but couldn't find anything that seemed appropriate. Any help is appreciated.
Mike
EDIT: Nevermind, I found an unofficial installer exe.
Try installing using Scipy wheel file. Download it from here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy
Make sure to download the one that's compatible with your Python version and your laptop bit. Then install it like this: pip install "path\to\your\wheel\file\scipy-0.18.1-cp27-cp27m-win_amd64.whl"
To install SciPy on Windows you have to have a fortran compiler installed. The SciPy project recommends MinGW. See Building and installing SciPy. To install MinGW follow these instructions: HOWTO Install the MinGW (GCC) Compiler Suite. Then before you run pip or easy_install to install SciPy make sure that you have MinGW added to your path. See MinGW Installation Notes - Environmental Variables
A side note, It would be easier to use either the Enthought Distribution (part of the initial install) or the Active State Distribution (through pypm 32-bit only) as they already have precomiled binary packages for SciPy. Or, you could use the SciPy precompiled binary package installer for Windows.
Here I am going to share what I have done to install scipy.
MY PC Configuration is windows-7 64-bit & python 2.7
First I download the required packages form http://www.lfd.uci.edu/~gohlke/pythonlibs/ (which version match your configuration EX: cp27==>python2.7 & cp36==>3.6)
Second I extract the file using 7zip (also can be used any zipper like winrar)
Third I copy the scipy folder which I extracted and paste it into C:\Python27\Lib\site-packages (or put it where the exact location is in your PC like ..\..\Lib\site-packages)
NOTE: Have to install numpy first before installing scipy in this same way.
To install Scipy on Windows requires a C compiler and the presence of 3rd party C libraries on the system which are difficult to install on Windows. However you can use a Wheel (.whl) file through your command prompt to install Scipy.
I faced the same problem and this is what I did:
Go to https://pypi.python.org/pypi/scipy and download the version of Scipy which is compatible with your system and the Python version you have installed
e.g If you have 32-Bit Windows and Python 3.6 installed then you download the version with cp36 (version3.6) and Win-32.
After downloading copy this file in the directory where you have installed Python either in the Scripts or Lib folder.
Next use the command prompt to install it after changing to the directory where you have copied the file:
C:\....> pip install scipy-1.0.0b1-cp36-cp36m-win32.whl
Steps to download scipy on Windows-
1.Go to website sourceforge.net
2.Click Files
3.Downlaod the type you want
4.Install it.
Very easy and it worked for me.
I just got a new machine (osx-lion), and I'm in the process of trying to reinstall all of my tools. I'm trying to install NumPy and SciPy. I know that the version Apple ships isn't exactly what makes NumPy and SciPy happy, so I went to Python.org and installed the recommended version (2.7.3), which went smoothly. Now when I which python, it points to the new 2.7 version which was different than the one the machine came with. My PATH variable also contains the path to the 2.7 (python.org) version.
Then I downloaded NumPy and got the message:
numpy 1.6.1 cannot be installed on this disk. numpy requires python.org Python 2.6 to install.
So then I tried SciPy, and got the same message:
scipy 0.10.1 can't be installed on this disk. scipy requires python.org Python 2.6 to install.
After some googling, I see that the 2.6 required is just 2.6 or or greater, and I did install the Python.org version (2.7), but I must be missing something.
Edit - Just tried rebooting the machine in case there were some changes that needed a restart to take effect, but that didn't help.
Any help would be greatly appreciated. Thanks all.
A simple and easy way to install numpy and scipy without going through version conflicts is to use the Enthought python distribution. They have a free version that includes python and the two packages you want, and the iPython console that I like a lot. They also offer a more extensive distribution that is free only for academic use, otherwise you have to pay for it.
python.org recommends installing an updated version of python 2.x instead of the version that comes with OSX. Following this advice, I was able to get scipy and numpy to work without enthought. Here are the versions that I am using (some version numbers missing, my notes are not complete):
Python 2.7.2 from python.org (64 bit)
numpy/scipy (OSX 10.6 build)
ipython 0.12
readline
matplotlib
At the end of the day, enthought.com is the easiest way to install everything.
Install latest version of Xcode/devtools and fortran ( http://www.scipy.org/Installing_SciPy/Mac_OS_X ).
Confirm python version
python --version
Install pip
sudo easy_install pip
Install numpy
sudo pip install numpy
If it complains you have an older version of bumpy installed, upgrade it.
pip install numpy --upgrade
check how many tests it fails ;)
sudo pip install nose
python
import numpy as np
np.test('full')
If you have the OSX developer tools installed, you should be able to install from source without much trouble.
make sure you have setuptools/distribute installed in your Python.org installation: run distribute_setup.py from the new python
make sure you have the gfortran compiler for scipy. This is just brew install gfortran if you use Homebrew.
use the right easy_install to just do easy_install numpy; easy_install scipy. (Or, easy_install pip and then pip install numpy; pip install scipy.)
im not exactly sure how osx works, but if it prompts you for a directory select the one in which you installed python 2.7
you could also download numpy for 2.6 here: (via sourceforge)
http://sourceforge.net/projects/numpy/files/NumPy/1.6.1/numpy-1.6.1-py2.6-python.org-macosx10.3.dmg/download
note: i was searching for a scipy for 2.6 when i came across this on their website:
"Note that the Mac OS X binaries work with the Python from python.org, not with the Python provided by Apple. "
I suggest using the superpack by https://twitter.com/fonnesbeck you can find the install script here http://fonnesbeck.github.io/ScipySuperpack/
Enthought's canopy is a lot of money for software they did not build themselves.