pycharm 安裝第三方庫報錯:AttributeError: 'module' object has no attribute 'main'
pip升級到 10.0.1 之後 老版的pycharm 使用pip安裝第三方庫的時候會報錯,報錯如上圖所示:
其主要原因是 新版的 pip 更改了 部分api 將其中 pip.main() 改為 pip_main(),
舊版的pycharm中 在packaging_tool.py 中引用的就是 pip.main()方法,所以會報錯。
最簡單的、最完美的解決方法為:
1.找到pycharm 目錄下的 \helper\packaging_tool.py 檔案
2.用新版pycharm 的packaging_tool.py 替換 舊版 同名檔案
ps:博主的pycharm是2017.2.3的 更老的版本 是否試用此方法 還有待嘗試
新版packaging_tool.py檔案下載路徑為:
連結:https://pan.baidu.com/s/1nMIrm5ArlUK6nB1xnJ8ptA 密碼:mwzp
相關推薦
pycharm 安裝第三方庫報錯:AttributeError: 'module' object has no attribute 'main'
pip升級到 10.0.1 之後 老版的pycharm 使用pip安裝第三方庫的時候會報錯,報錯如上圖所示: 其主要原因是 新版的 pip 更改了 部分api 將其中 pip.main() 改為 pip_main(), 舊版的pycharm中 在packagi
import json後,報錯:AttributeError: 'module' object has no attribute 'dumps,原因分析及解決方法
編寫python程式碼,import json後,報錯:AttributeError: 'module' object has no attribute 'dumps',如下圖所示: 報錯資訊為:模組沒有方法dumps 單步除錯: 單步除錯,發現報錯相同。 檢視json
轉載:pycharm 安裝第三方庫報錯:AttributeError: 'module' object has no attribute 'main'
安裝第三方庫報錯:AttributeError: 'module' object has no attribute 'main' 出現以上問題主要是由於pip升級到 10.0.1 之後 老版的pycharm 使用pip安裝第三方庫的時候會報錯: 其主要原因是 新版的 pip 更改了 部分a
tensorflow報錯:AttributeError: module 'tensorflow' has no attribute 'feature_column'
跑tensorflow第一個例子,報錯AttributeError: module 'tensorflow' has no attribute 'feature_column' 查了一下,我的
Tkinter Combobox報錯:AttributeError:Event instance has no attribute 'Combo1'
最近在寫關於下拉列表的點選事件繫結功能Python。從網上找到的可以供參考的資源不多(可能姿勢不對)。 其中:出錯程式碼定位如下 ··· def msg_out(self): print(self.combo1.get()) self.Combo1.bi
django學習記錄-- 新增haystack搜尋框架時報錯:AttributeError: 'BlogIndex' object has no attribute 'fields'
懷著十分悲痛的心情寫下這篇部落格... 想要新增一個搜尋功能,按照網上的教程使用haystack+whoosh+jieba 一步一步到了最後建立索引的部分,這裡有兩個方法,rebuild_index 和 update_index。 第一次用rebuild_index,報
request庫 【Python】【親測好用】安裝第三方包報錯:AttributeError:'module' object has no attribute 'main'
0x00 環境簡介和安裝 我這裡使用的是python2.7版本,直接使用pycharm2018這款IDE。 首先在pycharm中配置一下virtualenv環境,virtualenv是一個建立獨立Python執行環境的工具,為一個應用建立一套“隔離”的Python執行環境。 建立new
【pycharm】pycharm上安裝tensorflow,報錯:AttributeError: module 'pip' has no attribute 'main' 解決方法
pycharm上安裝tensorflow,報錯:AttributeError: module 'pip' has no attribute 'main' 解決方法 解決方法: 在pycharm的安裝目錄下,找到helpers/packaging_tool.py檔案,
Python報錯之:AttributeError: 'NoneType' object has no attribute 'seq'
在用matplotlib進行資料視覺化、給圖形新增標籤資料標籤時遇到一個報錯:AttributeError: 'NoneType' object has no attribute 'seq'. 記錄一
Python指令碼報錯AttributeError: ‘module’ object has no attribute’xxx’解決方法
最近在編寫Python指令碼過程中遇到一個問題比較奇怪:Python指令碼完全正常沒問題,但執行總報錯"AttributeError: 'module' object has no attribute 'xxx'"。這其實是.pyc檔案存在問題。 問題定位:
報錯 AttributeError: 'module' object has no attribute 'bool_'
在使用import numpy時突然出現如下報錯: 出現AttributeError: ‘module’ object has no attribute ‘bool_’報錯. 解決辦法: **因為昨晚安裝caffe,但make報錯就沒有繼續,電腦裡已安
【python學習筆記(2)】指令碼報錯"AttributeError: 'module' object has no attribute 'xxx'"解決方法
最近在編寫Python指令碼過程中遇到一個問題比較奇怪:Python指令碼完全正常沒問題,但執行總報錯"AttributeError: 'module' object has no attribute 'xxx'"。這其實是.pyc檔案存在問題。 問題定位: 檢視imp
Python學習筆記:AttributeError: 'NoneType' object has no attribute 'text' 解決
#前言 最近在學習python,犯了很多低階錯誤,總結一下 #問題 AttributeError: ‘NoneType’ object has no attribute ‘text’ #出處 difficult = obj.find('d
Python錯誤:AttributeError: module 'signal' has no attribute 'SIGALRM'
電腦系統是win10 64位,在使用python的signal模組時報錯:“AttributeError: module 'signal' has no attribute 'SIGALRM'”,這是因為signal模組可以在linux下正常使用,但在windows下卻有一些
針對AttributeError: ‘module’ object has no attribute’xxx’的錯誤歸類
找不到 with 類型 error: 開頭 -a 發現 使用 def 目前遇見的有三種類型: 拼寫錯誤,模塊一定要拼寫錯誤,這個也是最容易犯的,發現找不到模塊的時候,最好先檢查一遍自己引入的模塊拼寫尤其是那些名字非常長的比如HTTPPasswordMgrWithDefau
AttributeError: module 'pip' has no attribute 'main'
Pycharm在執行pip安裝模組是報錯如下: 解決方法: 找到安裝路徑下的packaging_tool.py檔案修改如下: 我的路徑為D:\Program Files\JetBrains\PyCharm 2017.2.3\helpers\packaging_tool.py 原先: 修改後儲
python AttributeError: 'module' object has no attribute 'setdefaultencoding'
window下使用python,AttributeError: 'module' object has no attribute 'setdefaultencoding'問題的解決方法 參閱了http://www.jb51.net/article/54159.htm後進行整
AttributeError: 'module' object has no attribute 'post'問題
在學習python網頁爬蟲時,測試requests的post方法進行表單提交時,命名.py檔案為requests.py 程式碼如下: import requests params={'firstname':'xing','lastname':'ming'
AttributeError: 'module' object has no attribute 'urlopen'
編譯環境:python 3.1.2 測試程式: # coding = utf-8 import urllib def getHtml(url): page = urllib.
[python錯誤]builtins.AttributeError: 'module' object has no attribute 'request'
在python3.4.3版本下,使用wingIDE寫爬蟲的時候, 發生了builtins.AttributeError: 'module' object has no attribute 'request'的錯誤。 錯誤來源是程式碼中的 <span style="fo