亚洲免费在线-亚洲免费在线播放-亚洲免费在线观看-亚洲免费在线观看视频-亚洲免费在线看-亚洲免费在线视频

重裝Python 、Anaconda、Pycharm、Pytorch

系統 2634 0

重裝Python 、Anaconda、Pycharm、Pytorch 1.0.0 ?Tensorflow系統:

在安裝PyQt庫的時候Python2.7與3.6版本不兼容,導致Python運行程序報錯:process finished with exit code -1073741819 (0xC0000005) ,重新配置python版本也沒作用,只好重裝系統。

1,Anaconda 下載安裝(https://www.anaconda.com/download/),Anaconda最新版本基于python 3.7版本的,但目前Tensorflow還不提供python 3.7的安裝包,因此在Tensorflow安裝時還需額外的配置修改。Anaconda可以選擇安裝python 3.6版本的,Tensorflow直接可以下載安裝。

2,安裝Pycharm開發集成環境。(https://www.jetbrains.com/pycharm/)

3,安裝Pytorch 1.0.0版本。

            
              C:\Users\lenovo>python
Python 3.7.1 (default, Dec 10 2018, 22:54:23) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
Traceback (most recent call last):
  File "
              
                ", line 1, in 
                
                  
ModuleNotFoundError: No module named 'torch'
                
              
            
          
            
              G:\ProgramData\Anaconda3\Scripts>pip3 install https://download.pytorch.org/whl/cpu/torch-1.0.0-cp37-cp37m-win_amd64.whl
torch-1.0.0-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform.
You are using pip version 18.0, however version 19.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

G:\ProgramData\Anaconda3\Scripts>python -m pip install --upgrade pip
Collecting pip
  Downloading https://files.pythonhosted.org/packages/46/dc/7fd5df840efb3e56c8b4f768793a237ec4ee59891959d6a215d63f727023/pip-19.0.1-py2.py3-none-any.whl (1.4MB)
    100% |████████████████████████████████| 1.4MB 78kB/s
Installing collected packages: pip
  Found existing installation: pip 18.1
    Uninstalling pip-18.1:
      Successfully uninstalled pip-18.1
Successfully installed pip-19.0.1

G:\ProgramData\Anaconda3\Scripts>pip3 install https://download.pytorch.org/whl/cpu/torch-1.0.0-cp37-cp37m-win_amd64.whl
Collecting torch==1.0.0 from https://download.pytorch.org/whl/cpu/torch-1.0.0-cp37-cp37m-win_amd64.whl
  Downloading https://download.pytorch.org/whl/cpu/torch-1.0.0-cp37-cp37m-win_amd64.whl (71.0MB)
    100% |████████████████████████████████| 71.0MB 102kB/s
Installing collected packages: torch
Successfully installed torch-1.0.0

G:\ProgramData\Anaconda3\Scripts>pip3 install torchvision
Collecting torchvision
  Using cached https://files.pythonhosted.org/packages/ca/0d/f00b2885711e08bd71242ebe7b96561e6f6d01fdb4b9dcf4d37e2e13c5e1/torchvision-0.2.1-py2.py3-none-any.whl
Requirement already satisfied: pillow>=4.1.1 in g:\programdata\anaconda3\lib\site-packages (from torchvision) (5.3.0)
Requirement already satisfied: torch in g:\programdata\anaconda3\lib\site-packages (from torchvision) (1.0.0)
Requirement already satisfied: six in g:\programdata\anaconda3\lib\site-packages (from torchvision) (1.12.0)
Requirement already satisfied: numpy in g:\programdata\anaconda3\lib\site-packages (from torchvision) (1.15.4)
Installing collected packages: torchvision
Successfully installed torchvision-0.2.1

            
          

Pytorch導入成功。

            
              >>> import torch
            
          

至此,Pytorch 1.0.0安裝成功!?

4,Tensorflow安裝。?

?Anaconda安裝的是python3.7的版本,Tensorflow支持python3.6以下的版本,并不直接支持python3.7,因此下載Tensorflow whl的版本以后需更改文件名進行安裝。
# Windows CPU
# 下載https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.12.0-cp36-cp36m-win_amd64.whl
# 重命名文件,將36改為37
pip install tensorflow-1.12.0-cp37-cp37m-win_amd64.whl 進行安裝

            
              G:\ProgramData\Anaconda3\Scripts>pip install tensorflow
Collecting tensorflow
  Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow

G:\ProgramData\Anaconda3\Scripts>pip3 install --upgrade --ignore-installed tensorflow
Collecting tensorflow
  Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow
 

G:\ProgramData\Anaconda3\Scripts>pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl
Collecting tensorflow==1.12.0 from https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl
  Downloading https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl (62.0MB)
    3% |█                               | 2.3MB 244kB/s eta 0:04:04Could not install packages due to an EnvironmentError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2471)


G:\ProgramData\Anaconda3\Scripts>pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl
Collecting tensorflow==1.12.0 from https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl
  Downloading https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl (62.0MB)
    3% |█                               | 2.3MB 245kB/s eta 0:04:04Could not install packages due to an EnvironmentError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2471)


G:\ProgramData\Anaconda3\Scripts>pip install tensorflow-1.12.0-cp37-cp37m-win_amd64.whl
Requirement 'tensorflow-1.12.0-cp37-cp37m-win_amd64.whl' looks like a filename, but the file does not exist
Processing g:\programdata\anaconda3\scripts\tensorflow-1.12.0-cp37-cp37m-win_amd64.whl
Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'G:\\ProgramData\\Anaconda3\\Scripts\\tensorflow-1.12.0-cp37-cp37m-win_amd64.whl'


G:\ProgramData\Anaconda3\Scripts>pip install tensorflow-1.12.0-cp36-cp37m-win_amd64.whl
tensorflow-1.12.0-cp36-cp37m-win_amd64.whl is not a supported wheel on this platform.

G:\ProgramData\Anaconda3\Scripts>pip install tensorflow-1.12.0-cp37-cp37m-win_amd64.whl
Processing g:\programdata\anaconda3\scripts\tensorflow-1.12.0-cp37-cp37m-win_amd64.whl
Collecting grpcio>=1.8.6 (from tensorflow==1.12.0)
  Downloading https://files.pythonhosted.org/packages/17/80/b135a60dfb12e9e0d691e4e66020b6f90fd8864e17ed5c719881bdea7d41/grpcio-1.18.0-cp37-cp37m-win_amd64.whl (1.5MB)
    100% |████████████████████████████████| 1.5MB 2.1MB/s
Collecting keras-applications>=1.0.6 (from tensorflow==1.12.0)
  Using cached https://files.pythonhosted.org/packages/3f/c4/2ff40221029f7098d58f8d7fb99b97e8100f3293f9856f0fb5834bef100b/Keras_Applications-1.0.6-py2.py3-none-any.whl
Collecting gast>=0.2.0 (from tensorflow==1.12.0)
  Downloading https://files.pythonhosted.org/packages/4e/35/11749bf99b2d4e3cceb4d55ca22590b0d7c2c62b9de38ac4a4a7f4687421/gast-0.2.2.tar.gz
Requirement already satisfied: numpy>=1.13.3 in g:\programdata\anaconda3\lib\site-packages (from tensorflow==1.12.0) (1.15.4)
Collecting astor>=0.6.0 (from tensorflow==1.12.0)
  Using cached https://files.pythonhosted.org/packages/35/6b/11530768cac581a12952a2aad00e1526b89d242d0b9f59534ef6e6a1752f/astor-0.7.1-py2.py3-none-any.whl
Collecting protobuf>=3.6.1 (from tensorflow==1.12.0)
  Downloading https://files.pythonhosted.org/packages/77/78/a7f1ce761e2c738e209857175cd4f90a8562d1bde32868a8cd5290d58926/protobuf-3.6.1-py2.py3-none-any.whl (390kB)
    100% |████████████████████████████████| 399kB 58kB/s
Collecting termcolor>=1.1.0 (from tensorflow==1.12.0)
  Using cached https://files.pythonhosted.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz
Requirement already satisfied: wheel>=0.26 in g:\programdata\anaconda3\lib\site-packages (from tensorflow==1.12.0) (0.32.3)
Collecting absl-py>=0.1.6 (from tensorflow==1.12.0)
  Downloading https://files.pythonhosted.org/packages/31/bc/ab68120d1d89ae23b694a55fe2aece2f91194313b71f9b05a80b32d3c24b/absl-py-0.7.0.tar.gz (96kB)
    100% |████████████████████████████████| 102kB 86kB/s
Collecting keras-preprocessing>=1.0.5 (from tensorflow==1.12.0)
  Using cached https://files.pythonhosted.org/packages/fc/94/74e0fa783d3fc07e41715973435dd051ca89c550881b3454233c39c73e69/Keras_Preprocessing-1.0.5-py2.py3-none-any.whl
Collecting tensorboard<1.13.0,>=1.12.0 (from tensorflow==1.12.0)
  Downloading https://files.pythonhosted.org/packages/07/53/8d32ce9471c18f8d99028b7cef2e5b39ea8765bd7ef250ca05b490880971/tensorboard-1.12.2-py3-none-any.whl (3.0MB)
    100% |████████████████████████████████| 3.1MB 70kB/s
Requirement already satisfied: six>=1.10.0 in g:\programdata\anaconda3\lib\site-packages (from tensorflow==1.12.0) (1.12.0)
Requirement already satisfied: h5py in g:\programdata\anaconda3\lib\site-packages (from keras-applications>=1.0.6->tensorflow==1.12.0) (2.8.0)
Requirement already satisfied: setuptools in g:\programdata\anaconda3\lib\site-packages (from protobuf>=3.6.1->tensorflow==1.12.0) (40.6.3)
Requirement already satisfied: werkzeug>=0.11.10 in g:\programdata\anaconda3\lib\site-packages (from tensorboard<1.13.0,>=1.12.0->tensorflow==1.12.0) (0.14.1)
Collecting markdown>=2.6.8 (from tensorboard<1.13.0,>=1.12.0->tensorflow==1.12.0)
  Downloading https://files.pythonhosted.org/packages/7a/6b/5600647404ba15545ec37d2f7f58844d690baf2f81f3a60b862e48f29287/Markdown-3.0.1-py2.py3-none-any.whl (89kB)
    100% |████████████████████████████████| 92kB 56kB/s
Building wheels for collected packages: gast, termcolor, absl-py
  Building wheel for gast (setup.py) ... done
  Stored in directory: C:\Users\lenovo\AppData\Local\pip\Cache\wheels\5c\2e\7e\a1d4d4fcebe6c381f378ce7743a3ced3699feb89bcfbdadadd
  Building wheel for termcolor (setup.py) ... done
  Stored in directory: C:\Users\lenovo\AppData\Local\pip\Cache\wheels\7c\06\54\bc84598ba1daf8f970247f550b175aaaee85f68b4b0c5ab2c6
  Building wheel for absl-py (setup.py) ... done
  Stored in directory: C:\Users\lenovo\AppData\Local\pip\Cache\wheels\90\db\f8\2c3101f72ef1ad434e4662853174126ce30201a3e163dcbeca
Successfully built gast termcolor absl-py
Installing collected packages: grpcio, keras-applications, gast, astor, protobuf, termcolor, absl-py, keras-preprocessing, markdown, tensorboard, tensorflow
Successfully installed absl-py-0.7.0 astor-0.7.1 gast-0.2.2 grpcio-1.18.0 keras-applications-1.0.6 keras-preprocessing-1.0.5 markdown-3.0.1 protobuf-3.6.1 tensorboard-1.12.2 tensorflow-1.12.0 termcolor-1.1.0

G:\ProgramData\Anaconda3\Scripts>
            
          


Windows無法import tensorflow,提示“找不到DLL” :

            
              >>> import tensorflow
Traceback (most recent call last):
  File "G:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in 
              
                
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "G:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in 
                
                  
    _pywrap_tensorflow_internal = swig_import_helper()
  File "G:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "G:\ProgramData\Anaconda3\lib\imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "G:\ProgramData\Anaconda3\lib\imp.py", line 342, in load_dynamic
    return _load(spec)
ImportError: Module use of python36.dll conflicts with this version of Python.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "
                  
                    ", line 1, in 
                    
                      
  File "G:\ProgramData\Anaconda3\lib\site-packages\tensorflow\__init__.py", line 24, in 
                      
                        
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "G:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\__init__.py", line 49, in 
                        
                          
    from tensorflow.python import pywrap_tensorflow
  File "G:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in 
                          
                            
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "G:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in 
                            
                              
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "G:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in 
                              
                                
    _pywrap_tensorflow_internal = swig_import_helper()
  File "G:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "G:\ProgramData\Anaconda3\lib\imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "G:\ProgramData\Anaconda3\lib\imp.py", line 342, in load_dynamic
    return _load(spec)
ImportError: Module use of python36.dll conflicts with this version of Python.

                              
                            
                          
                        
                      
                    
                  
                
              
            
          

需要修改_pywrap_tensorflow_internal.pyd,從網上下載已經更新的_pywrap_tensorflow_internal.pyd 文件,覆蓋以下目錄中的同文件(G:\ProgramData\Anaconda3\Lib\site-packages\tensorflow\python)。https://www.jianshu.com/p/1a3e194886b4網友提供的_pywrap_tensorflow_internal.pyd 下載的地址:https://pan.baidu.com/s/14jTm2LUmjmvSgYsjyNJ9hw 提取碼: i453
重裝Python 、Anaconda、Pycharm、Pytorch 1.0.0 Tensorflow_第1張圖片

?然后,重新導入Tensorflow成功。

            
              >>> import tensorflow
>>>


            
          

?


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 91精品国产三级在线观看 | 四虎影院免费在线 | 人人干在线观看 | 一级片aa| 久久久四虎成人永久免费网站 | 欧美日韩成人高清色视频 | 久久久香蕉视频 | 亚洲国产精品ⅴa在线观看 亚洲国产精品aa在线看 | 一本本久综合久久爱 | 午夜一级视频 | 一级毛片区 | 久青草国产观看在线视频 | 亚洲网在线 | 九九热香蕉视频 | 老太做爰xxxx视频 | 欧美黑人巨大肥婆性视频 | 日韩精品中文字幕一区二区三区 | 一级毛片一| 国内精品自在欧美一区 | 成人青草亚洲国产 | 伊人影音| 狠狠色综合久久婷婷 | 香蕉人人超人人超免费看视频 | 天天操天天摸天天干 | 日本又黄又爽又色的视频免费 | 中文字幕亚洲欧美 | 亚洲偷图色综合色就色 | 99久久99热精品免费观看国产 | 狠狠色狠狠色综合婷婷tag | 国产成人无精品久久久 | 97成人精品视频在线播放 | 色女影院 | 免费成人小视频 | 国产成人精品一区二区三在线观看 | 久色视频在线观看 | 在线免费观看中文字幕 | 波多野结衣免费播放 | 欧美成人在线免费视频 | 欧美va亚洲va在线观看蝴蝶网 | 欧美三级美国一级 | 欧美色欧美亚洲高清在线观看 |