A
A
andreyAmaterasu2020-08-09 18:22:32
Python
andreyAmaterasu, 2020-08-09 18:22:32

Why can't download packages with pip?

When installing packages via pip, I get the following error:

ERROR: Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/80/c6/03bd9a8568952c275e8b2
ee4ab3ac744d5fff7a8d2b5bba5b93715ba742e/asgiref-3.2.4-py2.py3-none-any.whl (Caused by ProtocolError('Connection aborted.', ConnectionResetError(10054, 'Удаленный хост принудительно разорвал су
ществующее подключение', None, 10054, None)))


In the browser, files.pythonhosted.org also fails to navigate, it is reported that the connection has been reset. What could be the problem and how can it be solved?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alex F, 2020-08-10
@andreyAmaterasu

vim ~/.config/pip/pip.conf

[global]
trusted-host = pypi.python.org 
  pypi.org 
  files.pythonhosted.org
proxy = 192.168.1.45:3128 #указать прокси или удалить строку
user=y

O
olamedia., 2015-03-14
@vovaricofun

SELECT * FROM conversation 
INNER JOIN conversation_mem ON (conversation_mem.c_id = conversation.id) 
WHERE conversation_mem.user = $my_id 
ORDER BY conversation_mem.time DESC

well, if you need users right away
SELECT user_profile.* FROM conversation 
INNER JOIN conversation_mem m1 ON (m1.c_id = conversation.id) 
INNER JOIN conversation_mem m2 ON (m2.c_id = conversation.id) 
INNER JOIN user_profile ON (m2.user = user_profile.id) 
WHERE m1.user = $my_id 
ORDER BY conversation_mem.time DESC

* you can remove the conversation if the data from there is not needed
SELECT user_profile.* FROM conversation_mem m1 
INNER JOIN conversation_mem m2 ON (m1.c_id = m2.c_id) 
INNER JOIN user_profile ON (m2.user = user_profile.id) 
WHERE m1.user = $my_id 
ORDER BY conversation_mem.time DESC

and if you remove yourself from the interlocutors
WHERE ... AND m2.user <> $my_id

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question