1. 程式人生 > >Deepin下Python2.7安裝Django出現'module' object has no attribute 'lru_cache'錯誤

Deepin下Python2.7安裝Django出現'module' object has no attribute 'lru_cache'錯誤

錯誤資訊如下圖
錯誤資訊

這裡是解決方案

是Python與Django版本不匹配的問題。
使用pip命令“sudo pip install Django”下載的是Django2.0版本的壓縮包,所以安裝不成功;
改成下載Django1.9版本就OK了:sudo pip install Django==1.9

以下方案並不能解決問題!並不能!

  • 以為是電腦抽了,重灌Django或者重啟電腦【不能解決】
  • 修改下載好的Django檔案環境配置【不能解決,因為安裝不成功,所以pip下載的Django壓縮包也沒儲存,無法修改】

相關推薦

DeepinPython2.7安裝Django出現'module' object has no attribute 'lru_cache'錯誤

錯誤資訊如下圖 這裡是解決方案 是Python與Django版本不匹配的問題。 使用pip命令“sudo pip install Django”下載的是Django2

pytorch低版本載入高版本pytorch訓練得到的模型,出現moduleobject has no attribute ‘_rebuild_tensor_v2’錯誤

情景 使用pytorch0.3來載入Mobilenetv1的模型(用更高版本的pytorch訓練得到的),出現“AttributeError: ‘module’ object has no attrib

AttributeError:’moduleobject has no attribute ‘ifelse’錯誤資訊的解決方法

在執行訓練卷積神經網路CNN模型進行分類的Python程式碼過程中,出現如下錯誤資訊: AttributeError:’module’object has no attribute ‘ifelse’

擴充套件包安裝問題:module 'pip' has no attribute 'main'

找到安裝目錄下 helpers/packaging_tool.py檔案,找到如下程式碼: def do_install(pkgs): try: import pip except ImportError: erro

Python3.X出現AttributeError: module 'urllib' has no attribute 'urlopen'錯誤

研究用Python寫爬蟲,下載一個網頁。報錯程式碼如下 import urllib def getHtml(url): page = urllib.urlopen(url) html = page.read() return html html

Python 3.x中使用urllib出現AttributeError: module 'urllib' has no attribute 'request'錯誤

剛剛開始學習爬蟲,開始寫部落格打算把錯誤記錄下來,已杜自己忘記,並給同樣的小白幫助python 3.x中urllib庫和urilib2庫合併成了urllib庫,python3.X中應該使用urllib.request,即替換掉(python中的)urllib2成urllib.

pycharm 安裝第三方庫報錯:AttributeError: 'module' object has no attribute 'main'

pip升級到 10.0.1 之後 老版的pycharm 使用pip安裝第三方庫的時候會報錯,報錯如上圖所示: 其主要原因是 新版的 pip 更改了 部分api 將其中 pip.main() 改為 pip_main(), 舊版的pycharm中 在packagi

pyinstaller安裝出現'NoneType' object has no attribute 'rfind'問題解決

pyinstaller出現’NoneType’ object has no attribute ‘rfind’問題解決 用pyinstaller-2.0在linux上打包一個檔案,直接執行的原始碼pyinstaller.py進行安裝: ./pyinsta

error: ‘moduleobject has no attribute ‘_rebuild_tensor_v2’

bject itl func hooks except attribute def ttr imp import torch._utils try: torch._utils._rebuild_tensor_v2 except AttributeError:

針對AttributeError: ‘moduleobject has no attribute’xxx’的錯誤歸類

找不到 with 類型 error: 開頭 -a 發現 使用 def 目前遇見的有三種類型: 拼寫錯誤,模塊一定要拼寫錯誤,這個也是最容易犯的,發現找不到模塊的時候,最好先檢查一遍自己引入的模塊拼寫尤其是那些名字非常長的比如HTTPPasswordMgrWithDefau

django一次修改表中多個數據報'QuerySet' object has no attribute 'save'錯誤解決辦法

django中如果想修改資料庫表中的資訊,首先的查詢到對應的資料。 如果查詢條件查詢到的資料有多條,如 # 能夠查詢到兩條資料 person=Person.objects.filter(p_age=9) 而且也想同時修改這兩條資料的話,如果使用: person.p_a

module' object has no attribute 'urlretrieve'

python27的程式在python33中除錯時出現:‘module’ object has no attribute ‘urlretrieve’,的錯誤。 -- encoding:UTF-8 -- import urllib.request ‘module’

IDA執行加密演算法識別外掛findcrypt-yara報錯‘moduleobject has no attribute’set_name’

10月12日 findcrypt下載的是github專案, 負責人似乎沒維護好,指令碼原始碼findcrypt3.py裡的195行出錯 idc.set_name(value[0], name

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'

Python指令碼報錯AttributeError: ‘moduleobject has no attribute’xxx’解決方法

最近在編寫Python指令碼過程中遇到一個問題比較奇怪:Python指令碼完全正常沒問題,但執行總報錯"AttributeError: 'module' object has no attribute 'xxx'"。這其實是.pyc檔案存在問題。 問題定位:

Python基礎學習-'module' object has no attribute 'urlopen'解決方法

參考“http://blog.sina.com.cn/s/blog_5cf74e410102uxsg.html” 用的是python 3.4 非常簡單的一小段程式碼 #!/usr/bin/python # -*- coding: UTF-8 -*- import ur

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

報錯 AttributeError: 'module' object has no attribute 'bool_'

在使用import numpy時突然出現如下報錯: 出現AttributeError: ‘module’ object has no attribute ‘bool_’報錯. 解決辦法: **因為昨晚安裝caffe,但make報錯就沒有繼續,電腦裡已安