Skip to content
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

Error: Installing Python libraries with pip #11252

Closed
1 task done
eli1con opened this issue Jul 12, 2022 · 6 comments
Closed
1 task done

Error: Installing Python libraries with pip #11252

eli1con opened this issue Jul 12, 2022 · 6 comments
Labels
state: needs reproducer Need to reproduce issue type: support User Support

Comments

@eli1con
Copy link

eli1con commented Jul 12, 2022

Description

I have windows 10. Python 3.10. And an updated version of pip.

I downloaded some Python libraries to my computer. and every time I try to install them I get the following error. for example: I try to install numpy using the following command:

pip install C:\Users\Tania\Downloads\numpy-1.23.1.tar.gz
I get this error:

`Defaulting to user installation because normal site-packages is not writeable
Processing c:\users\tania\downloads\numpy-1.23.1.tar.gz
Installing build dependencies ... error
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [8 lines of output]
Ignoring packaging: markers 'platform_machine == "arm64"' don't match your environment
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001812FF39D80>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001812FF39960>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001812FF39B10>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001812FF3B880>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001812FF3A440>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools/
ERROR: Could not find a version that satisfies the requirement setuptools==59.2.0 (from versions: none)
ERROR: No matching distribution found for setuptools==59.2.0`

Expected behavior

No response

pip version

v22.1.2

Python version

3.10

OS

win 10

How to Reproduce

  1. Download a package.
  2. Installation

Output

No response

Code of Conduct

@eli1con eli1con added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Jul 12, 2022
@sbidoul
Copy link
Member

sbidoul commented Jul 12, 2022

Hi,

... getaddrinfo failed')': /simple/setuptools/ may indicate a misconfigured index.

What does pip config debug show in your case ?

@sbidoul sbidoul added type: support User Support state: needs reproducer Need to reproduce issue and removed type: bug A confirmed bug or unintended behavior S: needs triage Issues/PRs that need to be triaged labels Jul 13, 2022
@devmuppet
Copy link

getting the same issue :)

command ran:
[master ≡]> python -m pip install --upgrade pip

have global proxy config setup in pip.ini

[global]
proxy = http://domain\user:pass@proxy:8080/

and getting:

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001F103AEBB80>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))': /simple/pip/

tried fixes from previous posts:

#9190

@devmuppet
Copy link

@sbidoul -

python -m pip config debug
env_var:
env:
global:
C:\ProgramData\pip\pip.ini, exists: False
site:
C:\Usersuser\AppData\Local\Programs\Python\Python310\pip.ini, exists: False
user:
C:\Users\user\pip\pip.ini, exists: True
global.proxy: http://domain\user:pass@proxy:8080/
C:\Users\user\AppData\Roaming\pip\pip.ini, exists: False

@olis15
Copy link

olis15 commented Aug 30, 2023

I am also having this issue if anyone has resolved it that would be great help. We don't have any proxies tho that are noted in the debug and on the Windows settings for Network

@notatallshaw
Copy link
Member

notatallshaw commented Aug 30, 2023

Pip is internally using requests to to contact PyPI or the index you have specified, you therefore must be able to provide Pip the same configuration you would need to provide requests to connect to the PyPI or the index you have specified.

Having worked in a large Enterprise the fact that you don't think you're using a proxy of some sort does not at all mean you're not actually using one. Windows has a lot of unusal places that proxy information might being sourced from.

If you have requests installed already simply give this a try:

import requests

response = requests.get("https://pypi.org/simple/")  # Or the index you have specified
response.raise_for_status()

If this does not work then there is a network configuration you need to figure out on your side.

@ichard26
Copy link
Member

Given the lack of any follow up, this user support issue is stale/unactionable and should be closed.

On pip's end, #5380 tracks improving the guidance around network errors.

@pfmoore pfmoore closed this as completed Apr 15, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
state: needs reproducer Need to reproduce issue type: support User Support
Projects
None yet
Development

No branches or pull requests

7 participants