I want to install scipy and then theano through pip (pip install scipy) for Python 34.
But I get the following error:
failed building wheel for scipy both of the time
I have numpy installed and updated. What should I do?
I wrote an answer on installation of various packages of Python in this link : Here.
Do not attempt to install all the packages.
Just get an integrated Package (Links for download provided in the above link).
Related
I am currently on Linux x86-64 machine. I am trying to install opencv in my virtual environment using pip however the error I keep receiving is
ERROR: Could not find a version that satisfies the requirement numpy==1.19.3 (from versions: 1.19.2+computecanada, 1.21.0+computecanada, 1.21.2+computecanada)
ERROR: No matching distribution found for numpy==1.19.3
I am running python 3.9.6 (64bit) and my current numpy version is 1.21.3. the command I've been using is pip install opencv-python. i've also tried uninstalling other instances of openCV and have tried the other options all with the same error. Does openCV not support numpy 1.21.3? Would anyone be able to point me in the right direction?
On computecanada you don't need to install OpenCV.
You can use it by following these commands:
module spider opencv
module load opencv/version
Actually, this error happens if numpy version does not match OpenCV required version.
for my case:
I used python 3.6. so I solved this error by following:
pip install numpy==1.19.0
pip install opencv-python==3.4.11.45
after installing numpy I search which OpenCV version support this numpy version, I found 3.4.11.45 so I install it by 2 number command and it is working.
I'm trying to implement auto arima in my python 3.7 on Windows10 So I tried to install pyramid-armia using following command
pip install pyramid-arima
But I'm getting error message
Could not find a version that satisfies the requirement pyramid-arima (from versions: )]
No matching distribution found for pyramid-arima
I also tried steps mentioned here
But got the same error message
Can you please guide me to install it?
This error might be because there is no version of package that fits combination of versions of your Python, Operating System, Cpu Type and Instruction Set.
That package is out-dated and abandoned, hence not installable, use new replacement, which is pmdarima package:
pip install pmdarima
and import like:
import pmdarima
Official documentation for pmdarima is here.
If still you're getting same error for new pmdarima then download .whl package directly from here.
You need to download package corresponding to your python version and windows bits. E.g. if you have Python 3.7 and Windows 64-bit then download pmdarima-1.7.1-cp37-cp37m-win_amd64.whl (or with win32 suffix for 32-bit windows), here cp37 means CPython version 3.7.
Then just install it like this:
pip install pmdarima-1.7.1-cp37-cp37m-win_amd64.whl
Also many trouble-some Windows prebuild .whl packages that have problems with installation/compilation are located here. I've often downloaded this prebuilt packages from there, when haven't succeeded with pip install. But for the case of pmdarima it is located at the first link but not second.
This is a followup to this question
Installing a pip package with cupy as a requirement puts install in never ending loop
Where somehow a pip package was not able to detect that cupy is already installed, and tried to re-install it.
The solution given was to use
try:
import cupy
except Exception:
install_requires.append('cupy')
Which worked for when I tried to install through github with
!pip install https://github.com/Santosh-Gupta/SpeedTorch/archive/master.zip
However, when I uploaded by code to pip and tried to run it, it's re-installing cupy again
!pip install SpeedTorch
I am using Goolgle colab, which already has cupy installed. For convenience, here's a link to the notebook I am using
https://colab.research.google.com/drive/17KrdcHh29cpFMel_oYnOTkA1dNElolZ1
And here is my setup.py file
https://github.com/Santosh-Gupta/SpeedTorch/blob/master/setup.py
This problem may be unique to cupy, since I do not have this issue with other python packages.
This is not issue specific to CuPy. You should not modify install_requires in setup.py if you want to distribute your package as a wheel. setup.py runs when building a wheel package, not when installing it. In other words, install_requires is determined depending on whether cupy is available when building a wheel package.
I can not for the life of me figure out how to install the package statsmodels for Python 3. It feels like I've tried everything, but nothing is working.
Goal: import statsmodels in python
I start with:
pip install statsmodels
Main error messages:
Failed bulding wheel for statsmodels.
Cython is required to compile statsmodels from a development branch.
Please install Cython or download a source release of statsmodels.
So I try:
pip install cython
Gives:
Requirement already satisfied: cython in c:users\XXX\appdata\roaming\python\python36\site-packages
I installed cython by installing anaconda. I have tried almost all answers I could find by basic googling. But things just don't seem to be working.
Instead of listing the input\output of what I have tried I now only show the first steps, but let me know if you want to see the output of any commands.
How do I continue from here? Any help is appreciated, I've been trying to fix this for several days now and I'm only getting frustrated.
Right now I'm trying:
easy_install cython
This seemed to work, but afterwards pip install statsmodels didn't work.
Command ... failed with error code 1.
I tried:
git clone https://github.com/statsmodels/statsmodels
cd statsmodels
pip install .
And failed with a bunch of errors.
I ran into this same problem lastnight trying to install statsmodels. Finally what worked was installing the Microsoft Visual C++ compiler for Python found here: https://www.microsoft.com/en-gb/download/details.aspx?id=44266 then installing statsmodels by doing pip install statsmodels. I had already installed Cython by using pip. Though I do realize that was for Python 2.7. There doesn't seem to be this compiler available for Python 3.
The main statsmodels on PyPI is very old and uses a nonstandard setup. The release candidate for 0.10.0 is out now, and I would strongly recommend you use this one. You can install it using
pip install statsmodels=0.10.0rc2 --pre
It has wheels for all of the major platforms (Win/OSX/Linux), so you shouldn't see issues related to Cython.
To install statsmodels under anaconda, use
conda install statsmodels
The package is available in the repository of anacondata in version 0.8.0 which is the latest on pip as of now.
anaconda is not "just" a Python installation, it also contains the conda package manager that can install pre-built packages from the main repository of anaconda or from other "channels". It is not advisable to install packages that are available from the anaconda channel with pip, in general.
A comment on the issue of Cython here: to use Cython, your computer needs also a "development environment", that is the availability of a C compiler, of the Python development headers, among others. The C compiler must be compatible with the version of Python for which Cython is installed.
I have started working on python, and now, I want to solve real scientific problems for which SciPy is required.
I have tried to install SciPy with:
pip install scipy-0.16.0-cp34-none-win_amd64.whl
and I got message that SciPy is installed successfully. However, when I want to import SciPy the error is:
raise ImportError("Numpy OpenBLAS flavour is needed for this scipy build.")
ImportError: Numpy OpenBLAS flavour is needed for this scipy build.
I am using Windows OS, and I am using Eclipse+PyDev as an IDE. What makes this sort of problem? And how can I solve it?
Have you tried to install NumPy which is an requirement for SciPy?
You can download it here: Python Packages For Windows
Download and install the wheel for numpy with OpenBLAS from https://pypi.anaconda.org/carlkl/simple/numpy/