我目前正在使用python 3.6.5。我的任务需要python 2,所以我在Pycharm中用python2.7创建了一个环境。我想安装numpy库。但是,不能通过使用Pycharm来安装它。Pycharm提示通过终端安装。我的操作系统是Win10,python2.7的路径是
C:\Users\yashir\PycharmProjects\CSC411_A1\venv\Scripts\python.exe
我试过了
pip2 install numpy
它回来了
'pip2' is not recognized as an internal or external command,
operable program or batch file.
我该怎么解决呢?
发布于 2018-10-14 04:58:16
我试过以下几种方法,效果很好。
C:\Users\yashi>cd PycharmProjects\CSC411_A1\venv\Scripts
pip2 install numpy
但它带来了另一个问题
Could not find a version that satisfies the requirement numpy (from versions: )
No matching distribution found for numpy
因此,我下载了numpy-1.15.2-cp27-无-win_ and 64文件,并执行
pip2 install numpy-1.15.2-cp27-none-win_amd64
那就成功了。
发布于 2018-10-14 04:51:22
在终端中使用pip之前,需要将其添加到环境变量中:
本页将指导您:链接
发布于 2018-10-14 05:03:31
假设您使用的是.whl文件,则使用以下命令:
python安装-m pip
不能100%确定这是否适用于python2.7
https://stackoverflow.com/questions/52799516
复制相似问题