Jony
Jony

Reputation: 141

Could not find a version that satisfies the requirement numpy == 1.9.3

Trying to install quandl and need pandas, so I tried pip install pandas and get:

Could not find a version that satisfies the requirement numpy==1.9.3 (from versions: 1.10.4, 1.11.0, 1.11.1rc1, 1.11.1, 1.11.2rc1, 1.11.2, 1.11.3, 1.12.0b1, 1.12.0rc1, 1.12.0rc2, 1.12.0, 1.12.1rc1, 1.12.1, 1.13.0rc1, 1.13.0rc2, 1.13.0, 1.13.1, 1.13.3, 1.14.0rc1, 1.14.0, 1.14.1, 1.14.2) No matching distribution found for numpy==1.9.3.

I'm using python 3.4, win32

Upvotes: 13

Views: 111925

Answers (13)

Canad ienne
Canad ienne

Reputation: 1

To solve this issue, you need to run the following command in the terminal:

pip install opencv-contrib-python

Upvotes: 0

Fethi Tekyaygil
Fethi Tekyaygil

Reputation: 343

I had the same error with OpenCV, upgrading the pip version solved the issue:

python -m pip install --upgrade pip

After the update the error is gone.

Upvotes: 1

BaiJiFeiLong
BaiJiFeiLong

Reputation: 4665

https://pypi.org/project/numpy/1.22.1/#files

Latest numpy does not support python 3.7 anymore.

Upvotes: 7

Manh Quang Do
Manh Quang Do

Reputation: 81

You can also follow this steps here

Select: Workloads → Desktop development with C++, then for Individual Components, select only:

  • Windows 10 SDK
  • C++ x64/x86 build tools

Can also achieve the same automatically using the following command:

vs_buildtools.exe --norestart --passive --downloadThenInstall --includeRecommended --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Workload.MSBuildTools

Go to the link and download vs_buildtools.exe

I did that and it worked. Good Luck!

Upvotes: 1

Miodrag Smolovic
Miodrag Smolovic

Reputation: 369

I had a similar problem, with installed python 3.6.9. Trying to install requirements with "pip install -r requirements.txt" gave me a similar error (can't find numpy version, in my case, it was 1.9.6). I triedpython3 -m pip install -r requirements.txt but it seems, for some reason the pip module for python3 hasn't been installed in my case. So, I installed it manually and repeated the command, and the requirements has been installed.

Manually installing pip module for python3:

Securely Download get-pip.py

Run python3 get-pip.py

Run sudo apt install python3-testresources

This will install or upgrade pip. Additionally, it will install setuptools and wheel if they’re not installed already.

"Warning: Be cautious if you’re using a Python install that’s managed by your operating system or another package manager. get-pip.py does not coordinate with those tools, and may leave your system in an inconsistent state. You can use python get-pip.py --prefix=/usr/local/ to install in /usr/local which is designed for locally-installed software."

And, finally, run python3 -m pip install -r requirements.txt

Upvotes: 2

AKS
AKS

Reputation: 17336

In my case, we wanted to get pip modules installed from requirement*.txt files, which had locked-in module's versions defined in the file and fetched from an internal Artifactory server (rather than going to online i.e. pypi.org)

Ex: requirements.txt file(s)

numpy==1.16.2
pandas==1.0.3
..
...

To fix the issue: I had to use NO_PROXY=<value> available as an environment variable.

Let's say, if you artifactory server is: my-artifactory.company.local or my-artifactory.company.com, then all we need to ensure is that NO_PROXY variable has that hostname's "domain" part listed in its value.

i.e. for my-artifactory.company.com or my-artifactory.company.local, value inside

NO_PROXY variable must have: ,.company.com,.company.local,... in it.

Sample exported variable (at command line $ prompt):

export NO_PROXY=localhost,127.0.0.1,169.254.169.254,169.254.169.123,.somecompany.com,.company.com,.company.local,pki.company.com,s3-us-gov-west-1.amazonaws.com,s3-fips-us-gov-west-1.amazonaws.com,rds.amazonaws.com,10.201.12.244,10.201.44.62,10.201.32.261

====

If you are using a Dockerfile, then, ensure you have ARG/ENV variable are set correctly. ARG is used during build time (can be overridden at command line using --build-arg option sent to docker build -t tag . where it'll search current directory for a Dockerfile and create an image. ENV is used at run time (docker run) and can be overridden as well.

Sample Dockerfile is:

FROM python:3.7

MAINTAINER [email protected]

ARG PYTHONBUFFERED=0
ARG HTTPS_PROXY=http://proxy.ext.company.com:80
ARG HTTP_PROXY=http://proxy.ext.company.com:80
ARG NO_PROXY=localhost,127.0.0.1,169.254.169.254,.company.com,.company.local,pki.company.com,s3-us-gov-west-1.amazonaws.com,s3-fips-us-gov-west-1.amazonaws.com,rds.amazonaws.com

ENV PYTHONBUFFERED=${PYTHONBUFFERED}
ENV HTTPS_PROXY=${HTTPS_PROXY}
ENV HTTP_PROXY=${HTTP_PROXY}
ENV NO_PROXY=${NO_PROXY}

# If there are 3 requirements files in source control, I'm copy all for pip install, you don't have to. Use what modules you want / file you want.    
RUN mkdir -p code
COPY requirements.txt /code
COPY requirements-test.txt /code
COPY requirements-dev.txt /code

WORKDIR /code

# You can fetch from pypi.org but in my case, this was a security issue.
# RUN pip install --trusted-host pypi.org -r requirements.txt

RUN pip install --no-cache-dir --trusted-host my-artifactory.company.local -r requirements.txt -r requirements-test.txt -r requirements-dev.txt --index-url http://my-artifactory.company.local:8081/artifactory/api/pypi/pypi-local-deps/simple --disable-pip-version-check

The main line, which solved the issue in my case, was using the NO_PROXY (as listed above).

Any issues related to pip module not found, or module version not found, or any SSL errors SSLError(SSLCertVerificationError like errors, went away after applying the above NO_PROXY at cmd line or in Dockerfile:

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)'))': /simple/requests/

or

ERROR: Could not find a version that satisfies the requirement requests
ERROR: No matching distribution found for requests

or

ERROR: Could not find a version that satisfies the requirement numpy==1.16.2
ERROR: No matching distribution found for numpy==1.16.2

Upvotes: 1

Alex Montoya
Alex Montoya

Reputation: 5119

I changed the LASTEST VERSION into requirements.txt by pandas == 0.23.1 - at that time was the latest release of released - You can check in pandas

Upvotes: 1

Ashish S
Ashish S

Reputation: 19

Just Install Python 3.5 or higher.

Upvotes: 1

Nikhil Sharma
Nikhil Sharma

Reputation: 39

Just use this command :

pip install pandas==0.19.0 .

An older version which will not cry with this error !!

Upvotes: 3

emonigma
emonigma

Reputation: 4426

I had the same issue installing pandas from source, branch 0.22.x. I followed these steps and obtained this error:

$ python -m pip install -e .
Obtaining file:///Users/mmorin/Software/pandas
  Could not find a version that satisfies the requirement numpy==1.9.3 (from versions: 1.11.3, 1.12.0rc2, 1.12.0, 1.12.1rc1, 1.12.1, 1.13.0rc1, 1.13.0rc2, 1.13.0, 1.13.1, 1.13.3, 1.14.0rc1, 1.14.0, 1.14.1, 1.14.2, 1.14.3)
No matching distribution found for numpy==1.9.3

I found this issue on GitHub where @djhoese suggested using version 9.0.3 of pip instead of version 10.0.1. I added this line in ci/environment-dev.yaml:

 - pip==9.0.3

I gave the environment a new name for clarity, so the whole file is:

name: pandas-dev-pip9
channels:
  - defaults
  - conda-forge
dependencies:
  - Cython
  - NumPy
  - moto
  - pytest
  - python-dateutil
  - python=3
  - pytz
  - setuptools
  - sphinx
  - pip==9.0.3

Upvotes: 0

nickdmax
nickdmax

Reputation: 559

I had a similar issue and was told that Pandas no longer supports Python 3.4 so you will need to install an older version of Pandas (and perhaps an older version of numpy) to work with Python 3.4.

Not terribly satisfying I know but there it is.

Upvotes: 0

hpaulj
hpaulj

Reputation: 231625

The current quandl is more generous in its requirements:

https://pypi.python.org/pypi/Quandl

Requires Distributions
pandas (>=0.14)
numpy (>=1.8)

It's github setup is the same: https://github.com/quandl/quandl-python/blob/master/setup.py

Upvotes: 3

ilmarinen
ilmarinen

Reputation: 5727

Numpy is notoriously difficult to install as it contains dependencies (optional or selectable) on various non-Python packages. I would suggest to use a different environment manager such as Enthought or Anaconda (which I would recommend).

If you want to do a quick start, use the full-blown anaconda distribution. If you need more explicit control, use miniconda.

Once you have anaconda installed, all you need to do to create a new conda environment (similar to a virtual environment, but with non-python packages included in the environment itself) is

conda create -n my_shining_environment quandl

The above will include quandl (at the time of writing v3.3.0), numpy and all other dependencies for quandl.

Upvotes: -1

Related Questions