找不到满足要求的版本numpy == 1.9.3

时间:2018-04-12 20:45:45

标签: python python-3.x pandas numpy quandl

尝试安装quandl并需要pandas,所以我尝试pip install pandas并获取:

无法找到满足要求numpy == 1.9.3的版本(版本: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.2,1.13.0rc1,1.13.0rc2,1.13.0,1.13.3,1.13.3,1.13.0rc1,1.14。 0,1.14.1,1.14.2) 找不到numpy == 1.9.3的匹配分布。

我正在使用python 3.4,win32

我对此非常陌生,感谢您的帮助

9 个答案:

答案 0 :(得分:1)

目前quandl的要求更为慷慨:

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

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

它的github setup是相同的:https://github.com/quandl/quandl-python/blob/master/setup.py

答案 1 :(得分:1)

只需使用此命令:

public static String getUniqueDeviceId(Context context) { String deviceId; // 1 compute IMEI final TelephonyManager TelephonyMgr = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); if (ActivityCompat.checkSelfPermission(context, Manifest.permission.READ_PHONE_STATE) != PackageManager.PERMISSION_GRANTED) { } deviceId = TelephonyMgr.getDeviceId(); // Requires // READ_PHONE_STATE if (deviceId == null) { // 2 android ID - unreliable deviceId = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID); } if (deviceId == null) { Random r = new Random(); deviceId = String.valueOf((r.nextInt() + r.nextInt())); } e(deviceId); return deviceId; }

一个不会因该错误而哭泣的旧版本!

答案 2 :(得分:1)

我通过requirements.txt LASTEST VERSION (最新版本)更改为pandas == 0.23.1-当时是最新发布的版本-您可以登录{ {3}}

答案 3 :(得分:1)

只需安装Python 3.5或更高版本。

答案 4 :(得分:0)

我有一个similar issue并且被告知 Pandas不再支持Python 3.4 所以你需要安装一个旧版本的Pandas(也许是旧版本的numpy)来工作用Python 3.4。

我知道并不是非常令人满意,但确实如此。

答案 5 :(得分:0)

我从源代码0.22.x安装pandas时遇到了同样的问题。我跟着these steps并获得了此错误:

$ 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

我在GitHub上找到this issue,其中@djhoese建议使用9.0.3的版本pip而不是版本10.0.1。我在ci/environment-dev.yaml中添加了这一行:

 - pip==9.0.3

为了清晰起见,我给了环境一个新名称,因此整个文件是:

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

答案 6 :(得分:0)

就我而言,我们希望从需求*.txt 文件中安装 pip 模块,该文件锁定模块的版本在文件中定义,并且从内部 Artifactory 服务器(而不是上网,即 pypi.org

例如:requirements.txt 文件

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

要解决这个问题:我必须使用 NO_PROXY=<value> 作为环境变量。

假设您的工件服务器是:my-artifactory.company.local 或 my-artifactory.company.com,那么我们需要确保的是NO_PROXY 变量在其值中列出了该主机名的“”部分。

即为了 my-artifactory.company.com 或 my-artifactory.company.local,内部价值

NO_PROXY 变​​量必须包含:,.company.com,.company.local,...

示例导出的变量(在命令行 $ 提示符):

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

====

如果您使用的是 Dockerfile,那么请确保正确设置了 ARG/ENV 变量。 ARG 在构建时使用(可以在命令行中使用发送到 docker build -t tag . 的 --build-arg 选项覆盖,它将在当前目录中搜索 Dockerfile 并创建一个图像。ENV 在运行时使用({ {1}}) 并且也可以被覆盖。

示例 Dockerfile 是:

docker run

解决我的问题的主要方法是使用 NO_PROXY(如上所列)。

cmd 行 或<强>Dockerfile:

FROM python:3.7

MAINTAINER giga.sangal@company.com

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

SSLError(SSLCertVerificationError

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/

答案 7 :(得分:0)

我遇到了类似的问题,安装了 python 3.6.9。尝试使用“pip install -r requirements.txt”安装需求给了我一个类似的错误(找不到 numpy 版本,在我的情况下,它是 1.9.6)。我尝试了python3 -m pip install -r requirements.txt,但似乎由于某种原因,python3 的 pip 模块尚未安装在我的案例中。于是,我手动安装了一遍,重复命令,需求已经安装完毕。

为 python3 手动安装 pip module

安全下载get-pip.py

运行python3 get-pip.py

运行sudo apt install python3-testresources

这将安装或升级 pip。此外,它会安装 setuptools 和 wheel(如果尚未安装)。

"警告:如果您使用由您的操作系统或其他包管理器管理的 Python 安装,请务必小心。get-pip.py 不与这些工具协调,并且可能会使您的系统处于不一致的状态。您可以使用 python get-pip.py --prefix=/usr/local/ 安装在专为本地安装软件设计的 /usr/local 中。"

最后,运行 python3 -m pip install -r requirements.txt

答案 8 :(得分:-2)

Numpy很难安装,因为它包含各种非Python包的依赖项(可选或可选)。我建议使用不同的环境管理器,如Enthought或Anaconda(我建议)。

如果您想快速启动,请使用完整的anaconda发行版。如果您需要更明确的控制,请使用miniconda。

一旦安装了anaconda,你需要做的就是创建一个新的conda环境(类似于虚拟环境,但环境中包含非python包)

conda create -n my_shining_environment quandl

上面将包括quandl(在编写v3.3.0时),numpy和quandl的所有其他依赖项。