Невозможно установить пакет из файла requirements.txt с помощью pip на сервере разработки vagrant с использованием среды virtaul
Невозможно установить пакеты из файла requirements.txt на сервере разработки vagrant.
Сообщение об ошибке:
(env) vagrant@ubuntu-bionic:/vagrant$ pip install -r requirements.txt Collecting django==2.2 (from -r requirements.txt (line 1)) Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f745c06e748>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/django/ Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f745c06e7f0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/django/ Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f745c06e4e0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/django/ Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f745c06e550>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/django/ Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f745c06e908>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/django/
Не удалось найти версию, удовлетворяющую требованию django==2.2 (из -r requirements.txt (строка 1)) (from versions: ) Не найдено подходящего дистрибутива для django==2.2 (из -r requirements.txt (строка 1))
requirements.txt
django==2.2 djangorestframework==3.9.2
После получения ошибки я также проверил наличие последней версии для обоих пакетов, но все равно получил ту же ошибку.
Заранее спасибо
После повторного запуска git bash он заработал, я не знаю, почему он не работал. Но почему-то он заработал после повторного запуска и активации среды на сервере vagrant. Вот мое решение.
vagrant@ubuntu-bionic:~$ cd /vagrant/
vagrant@ubuntu-bionic:/vagrant$ source ~/env/bin/activate
(env) vagrant@ubuntu-bionic:/vagrant$ pip install -r requirements.txt
Collecting django==2.2 (from -r requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/54/85/0bef63668fb170888c1a2970ec897d4528d6072f32dee27653381a332642/Django-2.2-py3-none-any.whl (7.4MB)
100% |████████████████████████████████| 7.5MB 43kB/s
Collecting djangorestframework==3.9.2 (from -r requirements.txt (line 2))
Downloading https://files.pythonhosted.org/packages/cc/6d/5f225f18d7978d8753c1861368efc62470947003c7f9f9a5cc425fc0689b/djangorestframework-3.9.2-py2.py3-none-any.whl (911kB)
100% |████████████████████████████████| 921kB 403kB/s
Collecting pytz (from django==2.2->-r requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/d3/e3/d9f046b5d1c94a3aeab15f1f867aa414f8ee9d196fae6865f1d6a0ee1a0b/pytz-2021.3-py2.py3-none-any.whl (503kB)
100% |████████████████████████████████| 512kB 717kB/s
Collecting sqlparse (from django==2.2->-r requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/05/40/d836d55fb3f467243ee839ab7b814822fda522cd395fa41e282684e71ee5/sqlparse-0.4.2-py3-none-any.whl (42kB)
100% |████████████████████████████████| 51kB 2.8MB/s
Installing collected packages: pytz, sqlparse, django, djangorestframework
Successfully installed django-2.2 djangorestframework-3.9.2 pytz-2021.3 sqlparse-0.4.2