Skip to content

Connection aborted while trying to install numpy on a new computer #11892

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
WhatWouldJerryDo opened this issue Mar 24, 2023 · 2 comments
Closed
1 task done

Comments

@WhatWouldJerryDo
Copy link

WhatWouldJerryDo commented Mar 24, 2023

Description

Ever since I got this new computer I have not been able to install any python libraries. I can't seem to get pip to work in any of my IDE's (Visual Studio Code, PyCharm). Works just fine on my Kali Linux VM but pip doesn't work at all on my host machine. So far I've tried uninstalling then reinstalling Python & Pip which didn't work...

And also tried editing the 'connectionpool.py' file and changed this:

if self.proxy.scheme == "https":
conn.tls_in_tls_required = True

^^^ from True to False.... which didn't work.

Below is something that someone else mentioned as a solution in another issue here that was similar to mine:
Step 1:
Press Win+R to open Run, type in “regedit” and click OK.
Step 2:
Move to HKEY_CURRENT_USER/Software/Microsoft/Windows/Current Version/Internet Settings.
Step 3:
Find a file with the name 'ProxyServer' and delete it.
Step 4:
Open cmd
Step 5:
Fire a command 'pip install flask-bcrypt'

^^^ I tried following this, but when I got to 'HKEY_CURRENT_USER/Software/Microsoft/Windows/Current Version/Internet Settings' in my Registry Editor I did not see a specific file called 'ProxyServer', however I do see two different files that are related to proxies. Those files are 'ProxyEnable' && 'MigrateProxy' , however I did not want to delete these files as they were not the exact name of the file that was instructed to be deleted. Not sure if the name of the 'ProxyServer' file has changed or if those two files are just completely different.

Has anyone else experienced this issue and found a solution? I've been trying for months to resolve and nothing seems to work, so for now I'm stuck to only being able to use the full functionality of Python in my Kali Linux virtual machines and persistent USB drives. Which isn't that big of a drag as Kali Linux is what I mainly use, but it'd sure be nice to be able to get Python fully functional on my host machine, especially in regards to Windows Pen Testing / CTF's.

I'm going to show an example of the full input/output below just for extra information to anyone who is so kind to help me, happens in both virtual environments and globally, it happens literally everywhere - on all IDE's and terminals on my host:

(.venv) PS C:\Users\entropic\hello> pip install numpy

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))': /simple/numpy/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))': /simple/numpy/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))': /simple/numpy/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))': /simple/numpy/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))': /simple/numpy/
ERROR: Could not find a version that satisfies the requirement numpy (from versions: none)
ERROR: No matching distribution found for numpy
WARNING: There was an error checking the latest version of pip.

Expected behavior

Expected behavior would be something like me giving 'pip install numpy' or 'python.exe -m pip install numpy' or 'py -m pip install numpy' as input in the terminal,

and then having pip work and install numpy or ANY other module (doesn't work with any/all libraries, does not work at all)

pip version

pip 22.3.1

Python version

Python 3.11.2

OS

Windows 11

How to Reproduce

pip install numpy
pip install cyrpto.utils
python.exe -m pip install numpy
py -m pip install numpy
py -m pip install crypto

Output

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))': /simple/crypto/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))': /simple/crypto/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))': /simple/crypto/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))': /simple/crypto/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))': /simple/crypto/
ERROR: Could not find a version that satisfies the requirement crypto (from versions: none)
ERROR: No matching distribution found for crypto
WARNING: There was an error checking the latest version of pip.

Code of Conduct

@WhatWouldJerryDo WhatWouldJerryDo added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Mar 24, 2023
@XF3965
Copy link

XF3965 commented Sep 10, 2023

I have also encountered this problem, may I ask if you have solved this problem

@pradyunsg pradyunsg added type: support User Support C: network connectivity and removed type: bug A confirmed bug or unintended behavior S: needs triage Issues/PRs that need to be triaged labels Sep 10, 2023
@pradyunsg
Copy link
Member

Hi! Thanks for filing this but this isn't the right place for this issue.

I think that Python Discord's #help-* channels, #python on Libera.chat (IRC), python-list or python-tutor mailing lists,or StackOverflow would be better channels to get support for the issue you're facing.

@pradyunsg pradyunsg changed the title WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))': /simple/numpy/ Connection aborted while trying to install numpy on a new computer Sep 10, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants