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壓縮包也沒儲存,無法修改】