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.
Related
I'm quite new to machine learning and when I tried to install numpy and this happended Can you guys help me fix this. I'm using python 3.10.0
ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
I faced the same issue, I have a macos high sierra with python 3.10 and I have the same error while installing numpy in pip.
I managed to solve the problem by installing not the newest numpy 1.22.2 in pip. I install version 1.22.1.
Command:
pip install numpy==1.22.1
Numpy has not yet released a precompiled wheel for Python 3.10. What you can do, is downgrade to python 3.9. If you don't want to do this, you can try the unofficial wheels available here.
These are the important ones you should look for:
numpy‑1.21.2+mkl‑cp310‑cp310‑win_amd64.whl
numpy‑1.21.2+mkl‑cp310‑cp310‑win32.whl
(Choose based on your OS architecture)
Then download the file, go to your downloads folder, and run pip install "<your_filename_choice>.whl").
You could also just use the pipwin module.
Do this:
pip install pipwin
and then
pipwin install numpy
Note that wheels have been available for Python 3.10 since 5th November, see:
https://pypi.org/project/numpy/#files
specifically, I can see Python wheels for labelled as version cp310 (i.e. CPython 3.10) for Linux, Mac and Windows.
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
I am using 32 bit cmd, 64 bit windows, python 2.7
when I type the command pip install statsmodels
I get the following error for some module of scipy...
Failed building wheel for Scipy Failed cleaning build dir for scipy
install numpy
pip install numpy
If you face installation issues for numpy, get the pre-built windows installers from http://www.lfd.uci.edu/~gohlke/pythonlibs/ for your python version (python version is different from windows version).
numpy 32-bit: numpy-1.11.1+mkl-cp27-cp27m-win32.whl
numpy 64-bit: numpy-1.11.1+mkl-cp27-cp27m-win_amd64.whl
Later you require VC++ 9.0, then please get it from below link Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27
Then install
Get the pre-built windows installers from http://www.lfd.uci.edu/~gohlke/pythonlibs/ for your python version (python version is different from windows version).
Scipy 32-bit: scipy-0.18.0-cp27-cp27m-win32.whl
Scipy 64-bit: scipy-0.18.0-cp27-cp27m-win_amd64.whl
If it fails saying whl is not supported wheel on this platform , then upgrade pip using python -m pip install --upgrade pip and try installing scipy
Now try
pip install scipy
Then try
pip install statsmodels
It should work like a charm
I have tried to write this on cmd.exe and it worked.
pip install statsmodels==0.6.0
install statsmodels for python 2.7 in windows
An easier way to install python libraries on Windows with C/C++/Fortran/... dependencies is to use conda. conda is available in MiniConda or Anaconda continuum products.
Another easy way to install scientific python libraries on windows is to use Christoph Gohlke's windows web page.
If you have no much idea about all of them and how to manage dependencies on windows I recommend you uninstalling your Python and installing anaconda. Anaconda already has Numpy, Scipy, Matplotlib,..., and statsmodels pre-installed (see the list of the packages included in the anaconda distribution).
Make sure you are using the latest version of pip
To check which version you are using try:
pip --version
To install statsmodels you can either go to cmd.exe or if you are using python pycharm use "Terminal Window" and type:
pip install statsmodels==0.9.0
I am trying to install Numpy on Python 2.7 and I am using Windows 8.1. When I run Numpy from this link it says, "Python 2.7 required, which was not found in the registry ". How can resolve this issue, I already installed Python 2.7?
For Windows, you should check out Chris Gohlke's page:
http://www.lfd.uci.edu/~gohlke/pythonlibs
He has some Numpy builds there for Python 2.7.
You can first install wheel using pip.
pip install wheel
Then download the .whl file for Numpy from Chris Gohlke's page.
Then go to the directory where you downloaded the package.whl file in cmd and do the following
pip install package_you_downloaded.whl
I experienced a similar broken toolchain error while installing Numpy. You can check it here.
I changed to anaconda a while ago and in my mind its the best and most dynamic package manager for all platforms.
http://docs.continuum.io/anaconda/install.html
correct command after installing pip is:
python -m pip install numpy
You should use pip to install Numpy and any other librarys
check this for how to install pip
after installing, go to your command line and enter
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.