安裝的 Electrum 無法啟動,現在 Electrum-Ltc 不再工作 - 更新 python/urllib3?
我按照https://electrum.org/#download的說明安裝了電子
安裝依賴項: sudo apt-get install python3-setuptools python3-pyqt5 python3-pip
安裝 Electrum:sudo pip3 install https://download.electrum.org/3.1.1/Electrum-3.1.1.tar.gz
作業系統是 linux mint 17
當我通過應用程序菜單點擊電子圖示時,沒有任何反應。我已經安裝了電子 ltc 並且它正在工作。由於安裝了電子,它不會執行。
如果我嘗試通過命令行啟動它,我會收到以下錯誤:
$ ./電子
/usr/local/lib/python3.4/dist-packages/requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.7.1) or chardet (2.2.1) doesn't match a supported version! RequestsDependencyWarning) Error: cannot import name 'DependencyWarning'. Try 'sudo pip install <module-name>'
嘗試更新 urllib3 和 chardet 時出現以下錯誤:
$ sudo pip 安裝 urllib3
Requirement already satisfied (use --upgrade to upgrade): urllib3 in /usr/lib/python2.7/dist-packages Cleaning up...
$ pip install –upgrade urllib3
Downloading/unpacking urllib3 from https://pypi.python.org/packages/63/cb/6965947c13a94236f6d4b8223e21beb4d576dc72e8130bd7880f600839b8/urllib3-1.22-py2.py3-none-any.whl#md5=1c11e1c80371cc4e89911071010a98d1 Downloading urllib3-1.22-py2.py3-none-any.whl (132kB): 132kB downloaded Installing collected packages: urllib3 Found existing installation: urllib3 1.7.1 Not uninstalling urllib3 at /usr/lib/python2.7/dist-packages, owned by OS Can't roll back urllib3; was not uninstalled Cleaning up... Exception: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main status = self.run(options, args) File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 283, in run requirement_set.install(install_options, global_options, root=options.root_path) File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1436, in install requirement.install(install_options, global_options, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/pip/req.py", line 672, in install self.move_wheel_files(self.source_dir, root=root) File "/usr/lib/python2.7/dist-packages/pip/req.py", line 902, in move_wheel_files pycompile=self.pycompile, File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 206, in move_wheel_files clobber(source, lib_dir, True) File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 193, in clobber os.makedirs(destsubdir) File "/usr/lib/python2.7/os.py", line 157, in makedirs mkdir(name, mode) OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/urllib3'
如何更新 urllib3?
還是問題與我安裝的依賴項有關?
“安裝依賴項:sudo apt-get install python3-setuptools python3-pyqt5 python3-pip”
在我為 Electrum (btc) 安裝上述依賴項之前,Electrum-ltc 工作正常。
您的問題是您的系統中有兩個 python 安裝,
python2.7
並且python3.4
. 該pip
命令指的是 的包管理器python2.7
,因此當您發出 時pip install urllib3
,您正在嘗試urllib3
為錯誤的 Python 版本pip3
安裝/更新包 - 用於安裝/更新 Python 3 的包:$ pip3 install chardet urllib3 --upgrade --user
順便說一句,我不喜歡呼叫
sudo pip
/sudo pip3
因為一些 python 包是由apt
(像pip
它自己,setuptools
或者requests
)管理的,所以如果你首先安裝了$ apt install python3-setuptools
然後開始
sudo pip3 install
打包,遲早你會破壞東西,因為setuptools
許多python包被聲明為依賴項,你會不小心覆蓋python3-setuptools
安裝。sudo apt install
如果apt
不提供您需要的軟體包或提供舊版本的軟體包,則更安全pip install --user
。