tensorflow項目運行


運行一個tensorflow項目

1. 安裝tensorflow

  • 安裝最新版本2.1.0:pip install tensorflow
  • error:Cannot uninstall 'wrapt'. It is a distutils installed project 方法:pip install -U --ignore-installed wrapt enum34 simplejson netaddr
  • error:Cannot uninstall 'six'. It is a distutils installed project... 方法:pip install six --upgrade --ignore-installed six
  • error:Cannot uninstall 'html5lib'. It is a distutils installed project and thus we cannot accurately.... 方法:參考
  • 測試安裝: import tensorflow
  • error: ImportError: Could not find 'msvcp140.dll'. TensorFlow requires that this DLL be installed in a
  • 方法: 安裝Visual C ++ 下載鏈接
  • error: ModuleNotFoundError: No module named 'tensorflow.contrib 方法:准備安裝1.x版本

2. 安裝1.8.0版本tensorflow

  • 安裝: pip install tensorflow==1.8.0
  • error: from numpy.lib.arraypad import _validate_lengths ImportError: cannot import name '_validate_lengths' 方法:降低numpy版本
    • 安裝numpy:pip install numpy==1.8.2
    • error:Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: 'E:\anaconda3\Lib\site-packages\numpy\.libs\libopenblas.PYQHXLVVQ7VESDPUVUADXEVJOBGHJPAY.gfortran-win_amd64.dll'Consider using the --user option or check the permissions.
    • 成功安裝跟新numpy(具體問題看其他部分)
  • 運行程序
    • error:NotImplementedError: you are using tensorflow version 1.8.0 but only versions 1.3.0 to 1.3.1 are supported
    • 安裝1.3.0版本: pip install tensorflow==1.3.0

3.安裝虛擬環境

  • 配置方法
  • error: ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒絕訪問。: 'E:\virtualenv\polyrnn-pp-master\Lib\site-packages\numpy\.libs\libopenblas.BNVRK7633HSX7YVO2TADGR4A5KEKXJAW.gfortran-win_amd64.dll'

4. 運行juputer文件

其他問題

  1. You should consider upgrading via the 'python -m pip install --upgrade pip' command.
  • 使用命令:python -m pip install --user --upgrade pip==20.0.2
  • Requirement already up-to-date: pip==20.0.2 in e:\anaconda3\lib\site-packages (20.0.2): 提示已經存在
  • 刪除文件夾
  • 再次嘗試:成功
  1. numpy包異常,卻可以正常導入numpy

  • 刪除Lib文件夾下相應的numpy包,再次嘗試,成功
  • 類似方法跟新requests包

pip 常用命令

  • 安裝特定版本: pip install numpy==1.13.1
  • 查看版本信息: pip show numpy
  • 卸載版本: pip uninstall numpy


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM