I'm running 64 bit python 2.7 on Windows 7.
There are wheels for scipy at https://pypi.python.org/pypi/scipy
In the above link, which wheel is for scipy for 64-bit Windows?
Try installing through-
scipy-0.19.0.zip (md5, pgp)
extract the folder and run following command after setting the directories-
python setup.py install
(setup.py is contained in extracted folder)
If you not able to install it, try doing it through wheel-
http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy
Download scipy-0.19.0-cp27-cp27m-win_amd64.whl and place it in python folder.
Install scipy by-
pip install scipy-0.19.0-cp27-cp27m-win_amd64.whl
As it is mentioned here:
Windows does not have any package manager analogous to that in Linux, so installing one of the scientific Python distributions mentioned above is preferred. However, if that is not an option, Christoph Gohlke provides pre-built Windows installers for many Python packages, including all of the core SciPy stack, which work extremely well.
-- Source
Here is the link for windows installers(unofficial) for scipy. Also, check this link too.
Related
I have been trying to install paramiko module on windows without success. I have been getting errors related to Visual C++ compiler missing. Is it possible to install paramiko without having to go through compile process.
Based on the method from this question this is what I would suggest (assuming you already have >=python-2.7.9 installed, if not, upgrade, 2.7.9 comes with pip, pre 2.7.9 doesn't):
Get the appropriate pycrypto whl file (based on python version and win32/win_amd64). I've found some available here (can't vouch for the site as I don't use python on windows much).
Run pip install pycrypto-stuff.whl (in a command prompt window in the directory where you've saved the pycrypto whl file).
Run pip install paramiko (in a command prompt, but can be in w/e folder you like).
That should do the trick. In general a simple pip install package_name would work, but pycrypto does not provide a wheel file (binary package), therefore you have to build it. By the sound of it you don't have Visual C++ installed (or not the right version, it only works for one, I don't recall which), pycrypto needs an extension package built to use the system crypto libraries, which is why the source package isn't working.
I was able to get it working by installing the following packages using pip.
pip install bcrypt cryptography pynacl paramiko
These were the packages my Linux install used as prerequisites, so they should work on windows as well.
I am trying to install python and a series of packages onto a 64bit windows 7 desktop. I have installed Python 3.4, have Microsoft Visual Studio C++ installed, and have successfully installed numpy, pandas and a few others. I am getting the following error when trying to install scipy;
numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
I am using pip install offline, the install command I am using is;
pip install --no-index --find-links="S:\python\scipy 0.15.0" scipy
I have read the posts on here about requiring a compiler which if I understand correctly is the VS C++ compiler. I am using the 2010 version as I am using Python 3.4. This has worked for other packages.
Do I have to use the window binary or is there a way I can get pip install to work?
Many thanks for the help
The following link should solve all problems with Windows and SciPy; just choose the appropriate download. I was able to pip install the package with no problems. Every other solution I have tried gave me big headaches.
Source: http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy
Command:
pip install [Local File Location]\[Your specific file such as scipy-0.16.0-cp27-none-win_amd64.whl]
This assumes you have installed the following already:
Install Visual Studio 2015/2013 with Python Tools
(Is integrated into the setup options on install of 2015)
Install Visual Studio C++ Compiler for Python
Source: http://www.microsoft.com/en-us/download/details.aspx?id=44266
File Name: VCForPython27.msi
Install Python Version of choice
Source: python.org
File Name (e.g.): python-2.7.10.amd64.msi
My python's version is 2.7.10, 64-bits Windows 7.
Download scipy-0.18.0-cp27-cp27m-win_amd64.whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy
Open cmd
Make sure scipy-0.18.0-cp27-cp27m-win_amd64.whl is in cmd's current directory, then type pip install scipy-0.18.0-cp27-cp27m-win_amd64.whl.
It will be successful installed.
The solution to the absence of BLAS/LAPACK libraries for SciPy installations on Windows 7 64-bit is described here:
http://www.scipy.org/scipylib/building/windows.html
Installing Anaconda is much easier, but you still don't get Intel MKL or GPU support without paying for it (they are in the MKL Optimizations and Accelerate add-ons for Anaconda - I'm not sure if they use PLASMA and MAGMA either). With MKL optimization, numpy has outperformed IDL on large matrix computations by 10-fold. MATLAB uses the Intel MKL library internally and supports GPU computing, so one might as well use that for the price if they're a student ($50 for MATLAB + $10 for the Parallel Computing Toolbox). If you get the free trial of Intel Parallel Studio, it comes with the MKL library, as well as C++ and FORTRAN compilers that will come in handy if you want to install BLAS and LAPACK from MKL or ATLAS on Windows:
http://icl.cs.utk.edu/lapack-for-windows/lapack/
Parallel Studio also comes with the Intel MPI library, useful for cluster computing applications and their latest Xeon processsors. While the process of building BLAS and LAPACK with MKL optimization is not trivial, the benefits of doing so for Python and R are quite large, as described in this Intel webinar:
https://software.intel.com/en-us/articles/powered-by-mkl-accelerating-numpy-and-scipy-performance-with-intel-mkl-python
Anaconda and Enthought have built businesses out of making this functionality and a few other things easier to deploy. However, it is freely available to those willing to do a little work (and a little learning).
For those who use R, you can now get MKL optimized BLAS and LAPACK for free with R Open from Revolution Analytics.
EDIT: Anaconda Python now ships with MKL optimization, as well as support for a number of other Intel library optimizations through the Intel Python distribution. However, GPU support for Anaconda in the Accelerate library (formerly known as NumbaPro) is still over $10k USD! The best alternatives for that are probably PyCUDA and scikit-cuda, as copperhead (essentially a free version of Anaconda Accelerate) unfortunately ceased development five years ago. It can be found here if anybody wants to pick up where they left off.
Sorry to necro, but this is the first google search result. This is the solution that worked for me:
Download numpy+mkl wheel from
http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy.
Use the version that is the same as your python version (check using python -V). Eg. if your python is 3.5.2, download the wheel which shows cp35
Open command prompt and navigate to the folder where you downloaded the wheel. Run the command: pip install [file name of wheel]
Download the SciPy wheel from: http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy (similar to the step above).
As above, pip install [file name of wheel]
This was the order I got everything working. The second point is the most important one. Scipy needs Numpy+MKL, not just vanilla Numpy.
Install python 3.5
pip install "file path" (download Numpy+MKL wheel from here http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy)
pip install scipy
You probably just have too new (unsupported) Python 3.x installed.
This page has overcomplicated solutions to the problem. Most of numpy / scipy users should not need to compile their numpy installations or need to rely on 3rd party "numpy+mkl" wheels.
Downloading a compiler is an anti-pattern, you do not want to build
numpy, only use it. [github.com/numpy]
Solution
Once you have installed supported python version, remove your non-working numpy installation with
pip uninstall numpy
and install scipy with
pip install scipy --only-binary numpy
The --only-binary numpy will force installing binary wheel (.whl) version of numpy. If it fails, you have too new (not yet supported) version of python.
If you have multiple python versions installed, you can ensure that pip is installing the python version you want by
<path_to_python_executable> -m pip install <X>
instead of pip install <X>.
Why this is happening?
Scipy relies on numpy, as can be seen from the setup.py or just by reading the pip install logs.
If you have too new (non-supported) python installation, there are no built wheel (.whl) in the pip repository, but tarballs (.tar.gz), which in this case require the user machine to compile some C++-code during installation. See also: Python packaging: wheels vs tarball (tar.gz)
Appendix
Check the https://pypi.org/project/numpy/ for list of supported Python versions. Currently (2020-11-04) the newest supported python version is Python 3.9. when using numpy 1.19.3 or above, and Python 3.8 for numpy 1.19.2. (For compatibility of older numpy versions, see numpy release notes)
If you are on Windows and see pip trying to install numpy-<x>.tag.gz, you know it probably will not work. Try older version of Python, instead. You want to see pip to installing a binary wheel for numpy for Windows (numpy-<x>.whl). You can check the wheels in pip available for numpy here.
If you are working with Windows and Visual Studio 2015
Install miniconda http://conda.pydata.org/miniconda.html
Change your python environment to python 3.4 (32bit)
click on python environment 3.4 and open cmd
Enter the following commands
"conda install numpy"
"conda install pandas"
"conda install scipy"
Simple and Fast Installation of Scipy in Windows
From http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy download the
correct Scipy package for your Python version (e.g. the correct
package for python 3.5 and Windows x64 is scipy-0.19.1-cp35-cp35m-win_amd64.whl).
Open cmd inside the directory containing the downloaded Scipy
package.
Type pip install <<your-scipy-package-name>> (e.g. pip install
scipy-0.19.1-cp35-cp35m-win_amd64.whl).
My 5 cents; You can just install the entire (pre-compiled) SciPy from
https://github.com/scipy/scipy/releases
Good Luck!
For python27
1、Install numpy + mkl(download link:http://www.lfd.uci.edu/~gohlke/pythonlibs/)
2、install scipy (the same site)
OK!
Intel now provides a Python distribution for Linux / Windows / OS X for free called "Intel distribution for Python".
Its a complete Python distribution (e.g. python.exe is included in the package) which includes some pre-installed modules compiled against Intel's MKL (Math Kernel Library) and thus optimized for faster performance.
The distribution includes the modules NumPy, SciPy, scikit-learn, pandas, matplotlib, Numba, tbb, pyDAAL, Jupyter, and others. The drawback is a bit of lateness in upgrading to more recent versions of Python. For example as of today (1 May 2017) the distribution provides CPython 3.5 while the 3.6 version is already out. But if you don't need the new features they should be perfectly fine.
I was also getting same error while installing scikit-fuzzy. I resolved error as follows:
Install Numpy, a whl file
Install Scipy, again a whl file
choose file according to python version like amd64 for python3 and other win32 file for the python27
then pip install --user skfuzzy
I hope, It will work for you
Solutions:
As specified in many answers, download NumPy and SciPy whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/ and install with
pip install <whl_location>
Building BLAS/LAPACK from source
Using Miniconda.
Refer:
ScikitLearn Installation
Easiest way to install BLAS and LAPACK for scipy?
do this, it solved for me
pip install -U scikit-learn
I got the same error trying to install scipy, having also installed Visual Studio C++, numpy, etc. My problem was that I'd just installed Python 3.9.
I removed version 3.9.0 and downgraded to version 3.8.6 and scipy installed without problems.
Using resources at http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy will solve the problem. However, you should be careful about versions compatibility. After trying for several times, finally I decided to uninstall python and then installed a fresh version of python along with numpy and then installed scipy and this resolved my problem.
install intel's distribution of python https://software.intel.com/en-us/intel-distribution-for-python
better of for distribution of python should contain them initially
When trying to install Shapely on my Windows 64bit computer, I cannot get the GEOS library to work.
So far, I have run the OSGeo4W installer from which I installed GDAL (I believe the geos library is included in that package). After that, I checked and I have geos_c.dll on my C:\OSGeo4W\bin directory, but either I have missed some configuration steps or the library does not work.
I need Shapely to work, so I also ran pip install shapely after installing GDAL, and it apparently worked (although it could not find the C library for GEOS).
In my code, I can import Shapely, but when I try to use it, I get an error telling me "geos.dll" is not found.
Any help with this will be very appreciated. Thanks!
Anaconda/Miniconda users should install Shapely (and dependencies) with:
conda install shapely
As of 2020, other Python users can install binary wheels from PyPI with pip:
pip install shapely
(you may need --upgrade to get at least version 1.7.0, when binary wheels were added.) Note that binary wheels are not available for Python 2 on Windows.
Another resource for Windows users with Python installed from python.org, Christoph Gohlke maintains an excellent pool of Unofficial Windows Binaries for Python. Download the Shapely wheels for 32- or 64-bit versions of Python, which includes GEOS dependencies.
see my answer here https://stackoverflow.com/a/50623996/1683626
on windows 10, python 3.6.5 64bit
install osgeo4w
add installed folder to path e.g. C:\OSGeo4W64\bin
(must contain geos_c.dll)
restart command line
There is an version of Shapely available here that includes geos in the installer. Look at the bottom of the page.
I tried the method of #jozef but failed even I imported the folder to the path.
A straightforward solution: add geos_c.dll, geos.dll to the library folder of your python environment. Then it works.
I used the command below and it did work;
pip install Shapely==1.3.0
I've made it installing wheels for GDAL (and Fiona, in my case; might not be required) from https://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal
Providing a path to the geos_c.dll didn't work. Neither putting them into venv/Lib.
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
I would like to install python3 with lxml on windows 7.
There seems to be several versions available.
What's the best version/way to install?
By best I mostly mean the easiest.
Points if I don't have to compile anything.
I had the same problem locating the correct version. After several hours of confusion I finally found the windows binary for Python 3 at Christoph Gohlke's Unofficial Windows Binaries for Python Extension Packages website at UC, Irvine.
He truly has the A-Z of Python extensions, as long as it's available for Python. Anything one could want from the PIP installer to Chinese word segmentation, to a multi-taper Fourier spectral estimator. Beyond that it gets into biologic & scientific specialty extensions.
Use the current stable version of 3, 3.2.2. You can find a windows installer here http://python.org/ftp/python/3.2.2/python-3.2.2.msi that will install python for you.
Use the Python Package Index version of lxml: it has a windows installer specifically for Python 3.
http://pypi.python.org/packages/3.1/l/lxml/lxml-2.2.8.win32-py3.1.exe#md5=d1fb73a8596bb77e155cef7ae6b0bc53
Download and run the Python installer then download and run the lxml installer: it should be that easy.
No compilations and IMHO, the best way:
Mainly because the instructions below the most complete and still FAST to complete. On more than one occasions, using just the MSI and the LXML binaries, I've run into issues with the install breaking/getting gcc and mingw errors.
These instructions are for Windows7 or Windows8 with Python3.3.
However, they should work for various versions as the releases of python and other respective prerequisites change/evolve:
Install Python3.3:
Download the last release of Python3.3 (currently 3.3.5) from the downloads page HERE
Direct link for Win32 MSI installer -> HERE
Direct link for Win64 MSI installer -> HERE
Simply run the MSI to install python. It will register itself in the registry, and appear in Add/REmove Programs.
NOTE: my instructions that follow assume that you choose to install python to the default path of C:\python33\ when asked during the Python Installation Wizard
Add the C:\python33\ and C:\python33\scripts folders to the system path by adding those directories to the PATH environment variable from the Control Panel > System > Advanced System Settings link (Advanced Tab) > Environmental Variables (Button).
(OPTIONAL) Install OpenSSL:
Download Win32 OpenSSL page from HERE for your version of Windows and PC architecture
Download Visual C++ 2008 redistributables for your version of Windows and PC architecture
Download OpenSSL for your version of Windows and architecture (the regular version, not the light one)
Add the following (depending on your architecture) directory (or wherever you insalled to) to your PATH, the same way you added C:\python33 and C:\python33\scripts above:
32-bit: c:\openssl-win32\bin
64-bit: c:\openssl-win64\bin
Install Setuptools (get-pip.py should install Setuptools for you), but, just in case...
Download ez_setup.py HERE and save it in C:\python33\scripts
Run C:\python33\scripts> python ez_setup.py
Install PIP
Download get-pip.py from HERE and save it in C:\python33\scripts
Run C:\python33\scripts> python get-pip.py
Install LXML
Download LXML 3.3.3 from HERE for your version of Windows and PC architecture
Run the EXE file
The latest version of lxml (3.6.0) now supports the Wheel format, so there is no problem with installing it with pip:
pip install lxml
Worth noting that Python3 is only supported on Windows 7 up to version 3.8.6 - beyond that it fails to install with an error similar to the following in the Python log file:
[2490:291C][2020-11-14T14:22:21]e000: Windows 8.1 or later is required to continue installation
This is mentioned in the Python Releases for Windows download page:
Note that Python 3.9.0 cannot be used on Windows 7 or earlier.
[...]
Note that Python 3.8.6 cannot be used on Windows XP or earlier.
Hence if installing with Chocolatey, the following command is needed:
choco install python3 --version 3.8.6