I have problems with installing SciPy on windows. I've already tried pip install (which worked for NumPy) but it didn't work out. Any idea how to solve this problem?
I recommend installing Anaconda which is a binary distribution system, which means that you don't need to compile yourself. Overall I find this to be a far easier way to handle packages on windows.
Using Anaconda, you can install scipy via:
conda install scipy
A good way with those kind of packages (scipy, numpy, ...) on Windows is to download (unoficial) binaries from this website and install it from here.
Once download, you can install it using pip :
pip install scipy-package.whl
Related
I have been installing and using OSMnx on my windows+ anaconda system. But, due to on and on issues on windows I have switched to Linux which is totally fresh.
I need a correct way to install OSMnx on Linux using pip . I can't install anaconda due to an
issue with size.
I tried finding .whl files which could help but can't get anywhere some places it mentioned .whl don't work on ubuntu.
I have jupyter notebook installed.
and I want to install OSMnx with proper steps.
Whether, I need to install shapely, fiona or geopandas or libdev files.
Please provide me proper steps for it. Thanks
I can't install anaconda due to an issue with size.
If a size issue is your only problem with anaconda, then you could use miniconda instead, as this will be far easier than installing with pip.
I need a correct way to install OSMnx on Linux using pip .
The anaconda size issue is the only challenge you stated in your question. Can you install with pip? Yes. Should you install with pip if a size issue is the only problem? No. But if you truly need to install with pip for some other unstated reason, note what the OSMnx installation instructions state:
you can install OSMnx via pip if you already have all of its dependencies installed and fully tested on your system. Note: installing the dependencies with pip is nontrivial. If you don’t know exactly what you’re doing, just use conda as described above.
OSMnx is pure Python but several of its dependencies have C/C++ dependencies themselves which must be compiled or must have platform-specific binaries installed. Because of that complexity, the OSMnx project itself formally supports only conda installation. If you need to install with pip, you'll need to install OSMnx's required dependencies one at a time by going to their developers' home pages and following each of their respective installation instructions for your platform, including installing any of their dependencies as needed. Once everything is installed and tested according to those developers' instructions, you can install OSMnx with pip.
When I try to install scipy for 3.4 it throws this error when I run this command:
sudo pip3.4 install scipy
https://www.pastiebin.com/5a7c65d7e44fe
I was able to get it to install with Python 3.6 but not 3.4.. which I need.
Installing Scipy or Numpy from scratch is usually hard work. At best try a distribution that already has it installed (WinPython, Anaconda). If you are on Linux install the packages that come with your distro. On Windows you can also grab the wheels at Gohlke.
I want to install NumPy using the pip install numpy command, but I get the following error:
RuntimeError: Broken toolchain: cannot link a simple C program
I'm using Windows 7 32 bit, Python 2.7.9, pip 6.1.1 and some MSVC compiler. I think it uses the compiler from Visual C++ 2010 Express, but actually I'm not sure which one, because I have several Visual Studio installations.
I know that there are prebuilt packages for Windows, but is there some way to do it just by typing pip install numpy?
I think that there could be other packages which must be compiled before usage, so it's not only about NumPy. I want to solve the problem with my compiler, so I could easily install any other similar package without necessity to search for prebuilt packages (and hope that there are some at all).
Check the installation of Python 2.7, and then install/reinstall pip which is described here. Then a open command line windows and write:
pip install numpy
Or
pip install scipy
If already installed, try this:
pip install -U numpy
Installing extension modules can be an issue with pip. This is why Conda exists. Conda is an open-source BSD-licensed cross-platform package manager. It can easily install NumPy.
Two options:
Install Anaconda here
Install Miniconda here and then go to a command line and type conda install numpy (make sure your PATH includes the location Conda was installed to).
Frustratingly, the NumPy package published to PyPI won't install on most Windows computers: Windows wheel package (.whl) on Pypi #5479
Instead:
Download the NumPy wheel for your Python version from Archived: Unofficial Windows Binaries for Python Extension Packages, NumPy
Install it from the command line:
pip install numpy-1.10.2+mkl-cp35-none-win_amd64.whl
As of March 2016, pip install numpy works on Windows without a Fortran compiler. See here.
pip install scipy still tries to use a compiler.
July 2018: mojoken reports pip install scipy working on Windows without a Fortran compiler.
py -m pip install numpy
Worked for me!
Install miniconda (here)
After installed, open Anaconda Prompt (search this in Start Menu)
Write:
pip install numpy
After installed, test:
import numpy as np
First go through page Download Python to download Python 3.6.1 or 2.7.13 either of your choice. I preferred to use Python 2.7 or 3.4.4.
Now after installation, go to the folder name python27 or python34, and click on the script. Now here open the command prompt by left clicking and Run as administrator.
After the command prompt appears, write "pip install numpy" there. This will install the latest version of NumPy and installing it will show a success comment. That's all.
Similarly, Matplotlib can be installed by just typing "pip install matplotlip". And now if you want to download SciPy, then just write "pip install scipy" and if it doesn't work then you need to download Python SciPy from SciPy: Scientific Library for Python and install it.
I had the same problem.
I decided in a very unexpected way. I just opened the command line as an administrator. And then typed:
pip install numpy
I am using PIP to install Scipy with MKL to accelerate the performance. My OS is Ubuntu 64 bit. Using the solution from this question, I create a file .numpy-site.cfg
[mkl]
library_dirs=/opt/intel/composer_xe_2013_sp1/mkl/lib/intel64/
include_dirs=/opt/intel/mkl/include/
mkl_libs=mkl_intel_lp64,mkl_intel_thread,mkl_core,mkl_rt
lapack_libs=
This file helps me to install Numpy with MKL successfully. However, using the same above file, installing Scipy prompts the error
ImportError: libmkl_rt.so: cannot open shared object file: No such file or directory
I also use
export LD_LIBRARY_PATH=/opt/intel/composer_xe_2013_sp1/mkl/lib/intel64
but the problem is still the same.
Anyone know how to fix this problem? I don't want to install Scipy manually so anyone give me some hints to fix it.
Intel has been publishing wheels of packages like Numpy, Scipy and Scikit-learn to PyPI. These wheels have been built while linking against Intel MKL, and include various optimizations.
If you want Scipy built with Intel MKL:
#Remove existing Numpy and/or Scipy:
pip uninstall numpy scipy -y
#Install scipy built with Intel MKL:
pip install intel-scipy
More information available here
2 years have passed since this question was asked.
There are now numpy/scipy wheels for linux that use a openblas compiled for avx2, so you can get much better performance without building packages. You may need to upgrade pip to get it to install the wheel:
pip install --upgrade pip
pip install numpy scipy
If you want MKL, then you can install Anaconda or Intel Distribution for Python. They use conda instead of pip to manage packages, but they are free and distribute packages that contain all the dependences, including MKL.
I have Win10 64Bit with Python 3.6.2 i have installed scipy through http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy
I followed following steps :
Step 1: Uninstall if you have any previous version of numpy,
pip uninstall numpy
Step 2 : Download numpy‑1.13.1+mkl‑cp36‑cp36m‑win_amd64.whl with
MKL(Math Kernel Library) from below link,
http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
Step 3: copy downloaded file into another location and launch command
prompt from that location.
Step 4: run this command,
pip install -U numpy-1.13.1+mkl-cp36-cp36m-win_amd64.whl
Step 5: Now Download scipy library from,
http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy
Step 6: Copy downloaded file into same location in which numpy is
copied.
Step 7: In CMD prompt run this cmd,
pip install scipy-0.19.1-cp36-cp36m-win_amd64.whl
Done!
If you are having trouble installing or running with specific version then first uninstall and then install
Step 1:
pip uninstall -v numpy
Step 2: download the wheel file and install
pip install -U numpy-1.13.0+mkl-cp36-cp36m-win_amd64.whl
In this example wheel file name is "numpy-1.13.0+mkl-cp36-cp36m-win_amd64.whl
"
I have been facing this problem the past few weeks on:
Windows 10 64 bit Python 3.5.2
My workaround:
First: pip install wheel
Next: Download Numpy and Scipy form Gholke's repo
Numpy and SciPy
Then:
pip install numpy_package.whl
pip install scipy_package.whl
Since the actual question itself was not answered, let me give it a shot...
I think the problem here basically is that the BLAS/LAPACK libraries being used are spread out across multiple location, and numpy doesn't handle this well.
We have fixed this in EasyBuild, where we have been building numpy/scipy on top of Intel MKL for a while now, with this patch: https://github.com/hpcugent/easybuild-easyconfigs/blob/master/easybuild/easyconfigs/n/numpy/numpy-1.8.1-mkl.patch
For me, MKL came with Scipy library by conda install scipy
#rscohn2 solution gave me a hint for using packages.
For the reference, my environment is included Ubuntu, Anaconda, Python 3.6, Scipy 1.1 and MKL 2018.0.
After a failed attempt at a "streamlined" install of the SimpleCV framework superpack for Windows. I'm now working through a manual installation guide (which I'm OK with as I have more control over the installation and might finally learn about installing Python Packages properly in Windows!)
Rather than just blindly follow the guide I'm trying to understand each step, so I'm confused by this..
easy_install pyreadline
easy_install PIL
easy_install cython
easy_install pip
pip install ipython
pip install https://github.com/ingenuitas/SimpleCV/zipball/1.3
Why not easy_install pip as soon as possible then pip the other packages?..
easy_install pip {{{I intend to research and probably use get-pip.py here}}}
pip install pyreadline
pip install PIL
pip install cython
pip install ipython
pip install https://github.com/ingenuitas/SimpleCV/zipball/1.3
Is there a pitfall doing it this way? (My limited understanding is that it's always preferable to use pip rather than easy_install.)
I know this question relates directly to SimpleCV but I want to learn the correct approach for when I'm installing package collections in the future without the benefit of a guide.
pip fetches the source code of the packages you're trying to install and compiles them. So if you don't have a compiler installed and configured it will fail to do so for packages which contain extensions written in C, which in this case applies to pyreadline, PIL and cython.
easy_install uses the precompiled packages from pypi (at least for windows if they're available), which means you don't need to compile everything yourself.
For pure python packages it's no problem using pip instead of easy_install, and if you have a compiler and the neccessary build dependencies installed it should also work.
I believe the answer is that pip does not currently support the installation of binary distributions, i.e. Python packages that include pre-compiled C extension modules. easy_install does.
BTW, there is work afoot to provide replacements for pip (and easy_install) that will fully support binary distributions on all platforms. See here for an overview.