1、安装keras_contrib,打开链接https://github.com/keras-team/keras-contrib,点击code,下载download zip(后续证明此方法不可用) 2、在vscode项目终端中输入
pip install C:\Users\dowat\Downloads\keras-contrib-master.zip
安装成功,pip list 3、运行项目,错误提示
ImportError: No module named 'keras_contrib'
4、在vscode中settings.json中加入下列命令,依旧错误
"python.pythonPath": "X:\\Anaconda\\envs\\tf\\python.exe"
5、终端中输入conda env list,发现未进入设置好的虚拟环境 在settings.json中设置为Command Prompt,而不是powershell,成功进入tf环境,但错误还在 7、发现是版本问题
tensorflow 1.10.0 has requirement setuptools<=39.1.0,
but you'll have setuptools 40.2.0 which is incompatible.
8、删除,在终端中重装,运行成功
pip uninstall keras_contrib
git clone https://www.github.com/keras-team/keras-contrib.git
cd keras-contrib
python setup.py install
|