Python, GEOS and Shapely on Windows 64 - python

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.

Related

Problem in installing ecapture in python 3.10

I was just preparing to make a voice assistant and an error occurred while I was installing the ecapture module in python. I used pip for installing and the error is as shown below.
Failed to build scikit-image
ERROR: Could not build wheels for scikit-image, which is required to install py.project.toml-based projects
I have tried to install it from PyPI
even I do have tried to restart my computer, reinstall python, etc.
but it doesn't just work.
Note: only use this answer if you trust binaries built by Christoph Gohlke, who maintains an excellent index of binaries here https://www.lfd.uci.edu/~gohlke/pythonlibs/
You can either grab the needed packages from there manually, or use this package (which I wrote, full disclosure):
pip install gohlkegrabber
ggrab . scikit-image
pip install scikit_image-0.19.0-cp310-cp310-win_amd64.whl
pip install ecapture
Note that the package you were lacking is scikit-image - you may be able to find binaries elsewhere as well, the site above is only provided as a suggestion. Again, only use if you trust the author.
Also note that the package was called scikit_image-0.19.0-cp310-cp310-win_amd64.whl for me, as I'm on Python 3.10 on 64-bit Windows. Yours may have a different name (if available), but the ggrab command will tell you.
Finally note that 0.19.0 just happens to be the most recent build on that site - it's not guaranteed to have the latest build, or to have the latest build for your OS/version of Python.

DLL load failed error when importing cv2

I have installed opencv on my windows machine using python 3.6 without any issues, using:
pip install opencv-python
but when I try to import cv2 I get the following error
ImportError: DLL load failed: The specified module could not be found.
I have seen this post
It says cv2 doesn't work with python 3 I was wondering if this has been fixed or if there is a way around it
I took a lot of time to solve this error!
Run command
pip install opencv-contrib-python
You can download the latest OpenCV 3.2.0 for Python 3.6 on Windows 32-bit or 64-bit machine, look for file starts withopencv_python‑3.2.0‑cp36‑cp36m, from this unofficial site. Then type below command to install it:
pip install opencv_python‑3.2.0‑cp36‑cp36m‑win32.whl (32-bit version)
pip install opencv_python‑3.2.0‑cp36‑cp36m‑win_amd64.whl (64-bit version)
I think it would be easier.
Update on 2017-09-15:
OpenCV 3.3.0 wheel files are now available in the unofficial site and replaced OpenCV 3.2.0.
Update on 2018-02-15:
OpenCV 3.4.0 wheel files are now available in the unofficial site and replaced OpenCV 3.3.0.
Update on 2018-06-19:
OpenCV 3.4.1 wheel files are now available in the unofficial site with CPython 3.5/3.6/3.7 support, and replaced OpenCV 3.4.0.
Update on 2018-10-03:
OpenCV 3.4.3 wheel files are now available in the unofficial site with CPython 3.5/3.6/3.7 support, and replaced OpenCV 3.4.1.
Update on 2019-01-30:
OpenCV 4.0.1 wheel files are now available in the unofficial site with CPython 3.5/3.6/3.7 support.
Update on 2019-06-10:
OpenCV 3.4.6 and OpenCV 4.1.0 wheel files are now available in the unofficial site with CPython 3.5/3.6/3.7 support.
Update on 2023-02-11:
OpenCV 4.5.5 wheel files are now available in the unofficial site with CPython 3.7/3.8/3.9/3.10/3.11 support.
If you are using Anaconda with python 3.5, this is a problem in the Anaconda release. (Refer this issue)
You can fix this issue by copying python3.dll file to Anaconda3 folder (where python.exe is located)
How to get "python3.dll"
In cmd, type python --version to find whether your installation is 64-bit or 32-bit
download python 3.x embeddable zip file from here
Extract the zip file and copy python3.dll file to Anaconda3 folder
But if you can move to Anaconda with python 3.6 you will not face this issue. If it is possible for you, then it is the recommended way..
Recently I have faced the similar issue in Azure Windows Server 2012 r2 . Tried all option with and without Anaconda but none of them helped. After lot of findings I found that mfplat.dll was missing which is related to Window Media Service.
Hence you have to manually install the features so that you can get dll related to window media service.
1.Turn windows features on or off
2.Skip the roles screen and directly go to Feature screen
3.Select "Desktop Experience" under "User Interfaces and Infrastructure"
After this all required dll of media services for opencv would be available.
So if you are planning to run your code in cloud(Window Server) then please dont forget to select Desktop Experience feature.
I ran into this problem on Windows 10 (N) with a new Anaconda installation based on Python 3.7 (OpenCV version 4.0). None of the above advice helped (such as installing OpenCV from the unofficial site nor installing VC Redistributable).
I checked DLL dependencies of ...\AppData\Local\conda\conda\envs\foo\Lib\site-packages\cv2\cv2.cp37-win_amd64.pyd using dumpbin.exe according to this github issue. I noticed a library MF.dll, which I figured out belongs to Windows Media Foundation.
So I installed Media Feature Pack for N versions of Windows 10 and voilà, the issue was resolved!
After spending too much time on this issue and trying out all different answers, here is what found:
The accepted answer by #thewaywewere is no longer applicable. I think this was applicable when opencv-python module still wasn't available.
This is indeed a bug in Anaconda 4.2 because they forgot to ship python3.dll. They have fixed this in next releases but unfortunately 4.2 is the last release with Python 3.5 as default. If you are stuck with Python 3.5 (for example VS2015 is only aware of versions up to 3.5) then you must manually download python3.dll as described in answer by #Ramesh-X.
If you can move on to Python 3.6 (which at present bit difficult if you are using OpenCV and VS2015) then just install latest Anaconda version and you don't have to deal with any of these.
There are many questions on that and many suggestions. None of them helped me for the recent Opencv 3.4.16 and Python 3.6/3.7.
Finally I switched to Pyhon 2.7.15 and installed opencv 3.1.0. The DLL-problem was solved.
When I look in cv2.pyd with dependency walker, the 3.1 has no dependency to one missing dll. Opencv 3.4 has this missing dependency to this dll:
API-MS-WIN-DOWNLEVEL-SHLWAPI-L1-1-0.DLL
may be this is the problem.
P.S.: I have Win7 pofessional 64Bit, 32Bit Python 2.7.15
Frankly there are a lot of very smart and complicated answers here. Mine is dumb and simple. I deleted my conda environment, re-installed from scratch, taking pains to install opencv first. This fixed my problems. Environments are meant to be temporary and diaphanous -- don't get too attached.
So if my environment was called fubar first make sure every instance is deactivated (including any IDEs that are using it). Then remove it:
conda remove --name fubar --all
Now I simply recreate my environment and add opencv first:
conda create --name fubar
conda activate fubar
conda install opencv
And then go from there. First open python and make sure import cv2 works. Then you should be on your way. Note I always (always) install Spyder last as it tends to screw things up when I don't.
Note, if that doesn't work, we have had some cases where people have to uninstall and reinstall Anaconda, and then things worked. Obviously a last resort.
In my case a major update of Windows 10 removed some Windows packages, so other methods (reinstalling opencv etc.) did not help. To fix it, install:
a) Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019
b) Media Feature Pack for N versions - needed only if you have Windows 10 N
Both need restart of PC.
I had the same issue when installing opencv 2.4.13 on Anaconda3 (Python 3.6)... I managed to fix this issue by reverting to Anaconda2 (Python 2.7)
this happens because the compiler or the interpreter is finding more than one package of the file, delete all the number of same package you have and then keep only one and then try to install. It serves
The issue is due to the missing python3.dll file in Anaconda3.
To fix the issue, you should simply copy the python3.dll to C:\Program Files\Anaconda3 (or wherever your Anaconda3 is installed).
You can get the python3.dll by downloading the binaries provided at the bottom of the Python's Release page and extracting the python3.dll from the ZIP file.
I had the same issue with python 3.6(Anaconda3) and OpenCV 3.4.1 for spyder to work. Even after copying cv2.pyd into Anaconda3 Users/home/Anaconda3/Lib/site-packages, it didn't work.
But found a solution
Later I installed OpenCV and Dlib on Anaconda and copied the generated cv2.cp36-win_amd64.pyd and dlib.cp36-win_amd64.pyd into Anaconda3 Users/home/Anaconda3/Lib/site-packages. These can be copied from environment folder C:\Users\home\Anaconda3\envs\opencv\Lib\site-packages.
Finally spyder started to work
I managed to get it to work by installing python 3.9.12 in a new environment (using conda), and then installing opencv in that environment. Because of my python version, opencv version 4.5.5 was installed instead of version 4.60.
(I had already updated VC2015-2022 and added the python3.dll to PATH; neither of these worked.)
I have the same problem. when I install WinPython programming, and run opencv after copy the cv2.pyd file from my opencv directory, it will be like this: C:\Users.....\Downloads\opencv\build\python\2.7\x64, x64 or x86 is depend on your 32 or 64 bit devices. and paste to C:\Users.....\Downloads\WinPython-64bit-3.5.4.1Qt5\python-3.5.4.amd64\Lib\site-packages, I prefer the previous python 3.5 than 3.6. Because when I "import cv2" installed (python 3.6) it shows directly: "ImportError: DLL load failed: The specified module could not be found"
Then I install python 3.5 and open WinPyhton Command prompt and type "pip install opencv-python".
The command prompt download opencv automatically, it shows the process like this "Successfully installed opencv-python-3.3.0.10"
Finally, I try to run open cv by type "import cv2", it works
i try to type "cv2.version", and shows: '3.3.0'
Under Winpython : the Winpython-64bit-.../python_.../DLLs directory the file cv2.pyd should be renamed to _cv2.pyd
(base) C:\WINDOWS\system32>conda install C:\Users\Todd\Downloads\opencv3-3.1.0-py35_0.tar.bz2
I ran this command from anaconda terminal after I downloaded the version from
https://anaconda.org/menpo/opencv3/files
This is the only way I could get cv2 to work and I tried everything for two days.
If this helps someone, on official python 3.6 windows docker image, to make this thing work I had to copy following libraries from my desktop:
C:\windows\system32
aepic.dll
avicap32.dll
avifil32.dll
avrt.dll
Chakra.dll
CompPkgSup.dll
CoreUIComponents.dll
cryptngc.dll
dcomp.dll
devmgr.dll
dmenterprisediagnostics.dll
dsreg.dll
edgeIso.dll
edpauditapi.dll
edputil.dll
efsadu.dll
efswrt.dll
ELSCore.dll
evr.dll
ieframe.dll
ksuser.dll
mf.dll
mfasfsrcsnk.dll
mfcore.dll
mfnetcore.dll
mfnetsrc.dll
mfplat.dll
mfreadwrite.dll
mftranscode.dll
msacm32.dll
msacm32.drv
msvfw32.dll
ngcrecovery.dll
oledlg.dll
policymanager.dll
RTWorkQ.dll
shdocvw.dll
webauthn.dll
WpAXHolder.dll
wuceffects.dll
C:\windows\SysWOW64
aepic.dll
avicap32.dll
avifil32.dll
avrt.dll
Chakra.dll
CompPkgSup.dll
CoreUIComponents.dll
cryptngc.dll
dcomp.dll
devmgr.dll
dsreg.dll
edgeIso.dll
edpauditapi.dll
edputil.dll
efsadu.dll
efswrt.dll
ELSCore.dll
evr.dll
ieframe.dll
ksuser.dll
mfasfsrcsnk.dll
mfcore.dll
mfnetcore.dll
mfnetsrc.dll
mfplat.dll
mfreadwrite.dll
mftranscode.dll
msacm32.dll
msvfw32.dll
oledlg.dll
policymanager.dll
RTWorkQ.dll
shdocvw.dll
webauthn.dll
wuceffects.dll`
Please Remember if you want to install python package/libraries for windows,
you should always consider Python unofficial Binaries
Step 1:
Search for your package, download dependent version 2.7 or 3.6 you can find it under Downloads/your_package_version.whl its called python wheel
Step 2:
Now install using pip,
pip install ~/Downloads/your_packae_ver.whl
this will install without any error.
I had the same problem and spent 3 full days wrestling with it. I tried everything suggested: upgrading pip, updating Visual C++, updating Anaconda, manually downloading files and basically every solution I could find on the web. Here's what finally worked maybe it'll help someone else:
1- I ditched Python 3 and Anaconda-based downloads since I noticed they had several problems and downloaded Python 2.7.16 64-bits instead.
2- Navigated to where Pip was located on my drive (for me the path is C:\Python27\Scripts) highlighted the path by selecting it, and typed "cmd" then enter so the Command Prompt opens on that path (I noticed skipping this usually brings about a couple errors)
3- Updated Pip using python -m pip install --upgrade pip on the CMD (again, skipping this and not updating it didn't let this procedure go through)
4- Downloaded the appropriate Wheel file from https://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv (after trying several the one that worked for me was opencv_python-2.4.13.7-cp27-cp27m-win_amd64.whl) I copy-pasted it to the same folder Pip was in (C:\Python27\Scripts for me) and then installed it through CMD using: pip install opencv_python-2.4.13.7-cp27-cp27m-win_amd64.whl. Always through CMD opened on that path as showed in step 2
5- After step 4 when I imported OpenCV using import cv2 I didn't have the DLL error anymore but an error related to numpy (since I had just installed that version of Python and so Numpy wasn't installed yet). I installed numpy by typing pip install numpy and voilà ! The problem was solved and OpenCV imported correctly.
Hope this helps someone.
In my case, I had to install an older version of openCV (windows 10, Python 3.6.8)
pip install opencv-python==3.3.0.9
This error can be caused by missing the following dll
To have this dll install:
https://www.microsoft.com/en-us/software-download/mediafeaturepack
as already explained above
Running python 3.8.8 from windows 10 powershell from an anaconda 4.10.1 environment I installed opencv with
conda install opencv
I could import opencv no problem when I launched python from the command line.
However, when I tried to run code from inside pydev using the python interpreter for the specific anaconda environment I had activated, pydev couldn't find whichever dll it was looking for when importing opencv.
Setting the following environment variable resolved the issue:
CONDA_DLL_SEARCH_MODIFICATION_ENABLE=1
Source: PyDev/Eclipse not loading _mklinit when run from a Conda environment
Which points to this trouble shooting description for a different library loading issue: https://docs.conda.io/projects/conda/en/latest/user-guide/troubleshooting.html#numpy-mkl-library-load-failed
If you are using a server or docker enviroment without a gui (e.g. Windows Core Server) make sure that you use the headless version of cv2:
pip install opencv-contrib-python-headless
I had the same problem, it seems openCV requires Windows Media Feature pack which is not installed on Windows 10 N by default, please install it using the following link:
https://www.microsoft.com/en-us/software-download/mediafeaturepack
Windows 11 N
This a final fix for the people who don't use anaconda.
simply there are missing DLL files, that's it
download the latest version of
https://sourceforge.net/projects/opencvlibrary/
Then after you extract it search for .dll files and copy all of them and paste into C:\Windows\System32 and approve for replacing.
That's it !
Install python using:
pip install opencv-python(It will take the latest version)
Make sure opencv-python is installed in path(\Python\Python36\Lib\site-packages),
you will find cv2 folder over there.
To check the version of cv2:
import cv2
print(cv2.__version__)

Which scipy wheel to install for Windows 7?

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.

Windows Scipy Install: No Lapack/Blas Resources Found

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

how to install scipy for python?

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

Categories

Resources