首页 > 解决方案 > pip install numpy - 不在 ec2 上安装 numpy

问题描述

我有一个空白品牌,打了新的 aws ec2 容器,并试图在虚拟环境中安装 pip。

唯一的问题是,它说安装成功,但没有找到 numpy

[ec2-user@ip-172-31-40-209 ~]$ virtualenv -p python36 env
Running virtualenv with interpreter /usr/bin/python36
Using base prefix '/usr'
New python executable in /home/ec2-user/env/bin/python36
Not overwriting existing python script /home/ec2-user/env/bin/python (you must use /home/ec2-user/env/bin/python36)
Installing setuptools, pip, wheel...done.
[ec2-user@ip-172-31-40-209 ~]$ source ./env/bin/activate
(env) [ec2-user@ip-172-31-40-209 ~]$
(env) [ec2-user@ip-172-31-40-209 ~]$ pip install numpy
Collecting numpy
  Using cached https://files.pythonhosted.org/packages/71/90/ca61e203e0080a8cef7ac21eca199829fa8d997f7c4da3e985b49d0a107d/numpy-1.14.3-cp36-cp36m-manylinux1_x86_64.whl
ccxt 1.11.149 requires aiohttp==3.0.1; python_version >= "3.5.3", which is not installed.
ccxt 1.11.149 requires cchardet==2.1.1; python_version >= "3.5.3", which is not installed.
ccxt 1.11.149 requires yarl==1.1.0; python_version >= "3.5.3", which is not installed.
aiodns 1.1.1 requires pycares>=1.0.0, which is not installed.
ccxt 1.11.149 has requirement setuptools==38.5.1, but you'll have setuptools 39.1.0 which is incompatible.
Installing collected packages: numpy
Successfully installed numpy-1.14.3
(env) [ec2-user@ip-172-31-40-209 ~]$  python -c "import numpy; numpy.show_config()"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'numpy'
(env) [ec2-user@ip-172-31-40-209 ~]$

有人知道问题是什么吗?

机器详情:

aws nano 512MB Ram 1024MB 交换 8GB 存储 AWS linux

标签: pythonamazon-web-servicesnumpy

解决方案


推荐阅读