我想为python安装模块pylsmlib以在fipy上使用它。
我正在遵循here的指示。我能够使用概述的方法安装LSMLIB python模块。
$ cd .../LSMLIB
$ mkdir build
$ cd build
$ ../configure
$ make
$ make install
当我想完成第二部分代码
时出现问题$ cd .../LSMLIB/pylsmlib
$ python setup.py install
它会引发错误
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.14.tar.gz
Traceback (most recent call last):
File "setup.py", line 12, in <module>
ez_setup.use_setuptools()
File "/home/alpha/.local/lib/python2.7/site-packages/ez_setup.py", line 145, in use_setuptools
return _do_download(version, download_base, to_dir, download_delay)
File "/home/alpha/.local/lib/python2.7/site-packages/ez_setup.py", line 124, in _do_download
to_dir, download_delay)
File "/home/alpha/.local/lib/python2.7/site-packages/ez_setup.py", line 193, in download_setuptools
src = urlopen(url)
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 435, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 473, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 403: SSL is required
我正在使用Debian 10 OS。我想知道如何解决这个错误。
答案 0 :(得分:0)
早在2017年10月,Distutils就禁用了HTTP访问:https://mail.python.org/pipermail/distutils-sig/2017-October/031714.html
您的选择是:
1)获取更新的setup.py
2)在使用它的行中将setup.py从“ http”修改为“ https”,例如
File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
但是说实话,这会让你陷入困境……
最好将工具升级到最新版本。
希望这会有所帮助。