Closed joomlagate closed 7 years ago
Well, finally I solved this problem myself. After some Googling, I realized that : my pip version is old, it need to be upgraded to the latest version.
how to check your pip version:
# pip -V
my pip version is 8.1.1, but the latest version is 9.0.1, so I ran following command to upgrade it:
# pip install --upgrade pip
Now check the pip version again:
# pip -V
pip 9.0.1 from /usr/local/lib/python2.7/dist-packages (python 2.7)
# letsencrypt-vesta USERNAME DOMAIN
Hope the author of letsencrypt-vesta will add a new feature of "automatically detect pip version and upgrade it if needed", this will avoid above mentioned errors.
Thank you.
@baijianpeng
OSError: Command /root/.local/share/letsencrypt/bin/python2.7 - setuptools pkg_resources pip wheel failed with error code 2
➜ ~ pip -V
pip 9.0.1 from /usr/local/lib/python2.7/dist-packages (python 2.7)
I update my pip but there is still such a error.
OSError: Command /root/.local/share/letsencrypt/bin/python2.7 - setuptools pkg_resources pip wheel failed with error code 2
--> pip -V
pip 9.0.1 from /usr/local/lib/python2.7/dist-packages (python 2.7)
my server pip 9.0.1 from /usr/local/lib/python2.7/dist-packages (python 2.7) there is still such a error. OSError: Command /root/.local/share/letsencrypt/bin/python2.7 - setuptools pkg_resources pip wheel failed with error code 2
how to fix this??? $pip install --upgrade pip Collecting pip Exception: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 209, in main status = self.run(options, args) File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 328, in run wb.build(autobuilding=True) File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 748, in build self.requirement_set.prepare_files(self.finder) File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 360, in prepare_files ignore_dependencies=self.ignore_dependencies)) File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 512, in _prepare_file finder, self.upgrade, require_hashes) File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 273, in populate_link self.link = finder.find_requirement(self, upgrade) File "/usr/lib/python2.7/dist-packages/pip/index.py", line 442, in find_requirement all_candidates = self.find_all_candidates(req.name) File "/usr/lib/python2.7/dist-packages/pip/index.py", line 400, in find_all_candidates for page in self._get_pages(url_locations, project_name): File "/usr/lib/python2.7/dist-packages/pip/index.py", line 545, in _get_pages page = self._get_page(location) File "/usr/lib/python2.7/dist-packages/pip/index.py", line 648, in _get_page return HTMLPage.get_page(link, session=self.session) File "/usr/lib/python2.7/dist-packages/pip/index.py", line 757, in get_page "Cache-Control": "max-age=600", File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 480, in get return self.request('GET', url, *kwargs) File "/usr/lib/python2.7/dist-packages/pip/download.py", line 378, in request return super(PipSession, self).request(method, url, args, kwargs) File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 468, in request resp = self.send(prep, send_kwargs) File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 576, in send r = adapter.send(request, kwargs) File "/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-any.whl/cachecontrol/adapter.py", line 46, in send resp = super(CacheControlAdapter, self).send(request, kw) File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/adapters.py", line 376, in send timeout=timeout File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 610, in urlopen _stacktrace=sys.exc_info()[2]) File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/util/retry.py", line 228, in increment total -= 1 TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
i solve this problem https://bbs.vpser.net/thread-16024-1-1.html
i solved.
if you have install python3, remove it.
apt-get purge python-virtualenv python3-virtualenv virtualenv
but, if you also have error. upgrade your pip with
wget https://pypi.python.org/packages/e7/a8/7556133689add8d1a54c0b14aeff0acb03c64707ce100ecd53934da1aa13/pip-8.1.2.tar.gz
tar -xzvf pip-8.1.2.tar.gz
cd pip-8.1.2
sudo python setup.py install
sudo -H pip install --upgrade pip
then
pip install virtualenv
@Young1993 @sbmzhcn
Why we have to remove python3? It was said that Certbot ALREADY support python3 since May 2017, see: https://github.com/certbot/certbot/issues/3179
And, we know that Ubuntu Server 16.04 installs both Python 2.7 and Python 3.5 .
Why we can not find a way to let letsencrypt-vesta script use the "python 3 support" feature of Certbot ?
Since I am not a programmer, hope some here will find a way to solve this issue perfectly.
Thank you.
No need to uninstall anything. This will fix your issue.
sudo apt-get install python-setools export LC_ALL="en_US.UTF-8" export LC_CTYPE="en_US.UTF-8"
Today I tried this script on a fresh installation of latest VestaCP 0.98-17 version. After VestaCP was installed, I created a new website (domain), without uploading any file.
Then I followed the installation guide of your script at:
https://github.com/interbrite/letsencrypt-vesta/blob/master/README.md
I exactly ran through those 5 steps in the "Installation" section. When running the 5th step, I got errors at the end:
Why? How to fix this?
My server OS is Ubuntu server 16.04.1 LTS 64-bit.
Thank you.