安装keras遇到的坑—无法找到模块

先下载了微软的一个插件:vc_redist.x64.exe (我的电脑时64位的)

后又重新安装了numpy,(把whl文件从script目录转移到了了“site-packages目录”)
还不清楚这两个是哪一个起了作用。

PS C:\WINDOWS\system32> cd C:\python\Lib\site-packages
PS C:\python\Lib\site-packages> pip install numpy-1.14.4+mkl-cp36-none-win_amd64.whl
Processing c:\python\lib\site-packages\numpy-1.14.4+mkl-cp36-none-win_amd64.whl
keras-preprocessing 1.0.1 requires keras>=2.1.6, which is not installed.
keras-applications 1.0.2 requires keras>=2.1.6, which is not installed.
Installing collected packages: numpy
  Found existing installation: numpy 1.14.4
    Uninstalling numpy-1.14.4:
      Successfully uninstalled numpy-1.14.4
Successfully installed numpy-1.14.4+mkl
PS C:\python\Lib\site-packages> pip install keras
Collecting keras
  Using cached https://files.pythonhosted.org/packages/68/12/4cabc5c01451eb3b413d19ea151f36e33026fc0efb932bf51bcaf54acbf5/Keras-2.2.0-py2.py3-none-any.whl
Requirement already satisfied: h5py in c:\python\lib\site-packages (from keras) (2.8.0)
Requirement already satisfied: six>=1.9.0 in c:\python\lib\site-packages (from keras) (1.11.0)
Requirement already satisfied: keras-preprocessing==1.0.1 in c:\python\lib\site-packages (from keras) (1.0.1)
Requirement already satisfied: pyyaml in c:\python\lib\site-packages (from keras) (3.12)
Requirement already satisfied: keras-applications==1.0.2 in c:\python\lib\site-packages (from keras) (1.0.2)
Requirement already satisfied: scipy>=0.14 in c:\python\lib\site-packages (from keras) (1.1.0)
Requirement already satisfied: numpy>=1.9.1 in c:\python\lib\site-packages (from keras) (1.14.4+mkl)
Installing collected packages: keras
Successfully installed keras-2.2.0
PS C:\python\Lib\site-packages> python
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import keras
Using TensorFlow backend.
>>>

猜你喜欢

转载自blog.csdn.net/qq_39782872/article/details/80646474