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

uv pip install error: No such host is known. (os error 11001) #2043

Closed
contang0 opened this issue Feb 28, 2024 · 8 comments
Closed

uv pip install error: No such host is known. (os error 11001) #2043

contang0 opened this issue Feb 28, 2024 · 8 comments
Labels
network Network connectivity e.g. proxies, DNS, and SSL question Asking for clarification or support

Comments

@contang0
Copy link

I am trying to use uv in a corporate environment and unfortunately packages fail to install. I get the following error:

error: error sending request for url (https://pypi.org/simple/networkx/): error trying to connect: dns error: No such host is known. (os error 11001)
  Caused by: error trying to connect: dns error: No such host is known. (os error 11001)
  Caused by: dns error: No such host is known. (os error 11001)
  • The command you invoked (e.g., uv pip sync requirements.txt), ideally including the --verbose flag.

uv pip install networkx

  • The current uv platform.

Windows 11

  • The current uv version (uv --version).

uv 0.1.11 (32e5cac 2024-02-26)

@konstin
Copy link
Member

konstin commented Feb 28, 2024

Do you know some details about your proxy setup?

@contang0
Copy link
Author

Hardly.. we're a big organisation. I know that we're using certificates to bypass a proxy, but not much more.

@zanieb zanieb added question Asking for clarification or support network Network connectivity e.g. proxies, DNS, and SSL labels Feb 28, 2024
@samypr100
Copy link
Collaborator

I know that we're using certificates to bypass a proxy

What's you pip.conf file like?

Do you configure a custom CA certificate like pip config set global.cert /path/to/your/ca-bundle.crt
or do you set some environment variables like REQUESTS_CA_BUNDLE or anything like described in https://pip.pypa.io/en/stable/topics/https-certificates/#using-a-specific-certificate-store

@samypr100
Copy link
Collaborator

samypr100 commented Feb 28, 2024

@konstin we can probably add support to allow users to specify their own CA bundles for uv-client like pip allows?

Maybe UV_CERT or UV_CA_BUNDLE to be similar to of PIP_CERT? Which would mean it reads it in and adds it to the reqwest client.

Also worth considering supporting pip.conf eventually.

@zanieb
Copy link
Member

zanieb commented Feb 29, 2024

You can use SSL_CERT_FILE since we're using rustls-native-certs

There's a pip.conf issue at #1404

@contang0
Copy link
Author

I had a look at my pip.ini (which is, I believe, the Windows alternative of pip.conf). It actually doesn't have any configuration for certs, just URLs to our Artifactory server that I think hosts a copy of pypi. We use our own copy for security reasons.

So I believe I would need a way to point uv to our local artifactory server rather than looking up pypi.

[global]
# pypi-remote is a local mirror of https://files.pythonhosted.org
index-url = https://artifactory.url/api/pypi/pypi-remote/simple
# pypi-local is a repository for packages developed at our organisation
extra-index-url = https:///artifactory.url/artifactory/api/pypi/pypi-local/simple

[search]
index = https://artifactory.url/artifactory/api/pypi/pypi-remote/

@zanieb
Copy link
Member

zanieb commented Feb 29, 2024

You can set the UV_INDEX_URL and UV_EXTRA_INDEX_URL environment variables or use the corresponding CLI flags.

@charliermarsh
Copy link
Member

Gonna tentatively close this out, since the thread suggests this is solved by the env vars.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
network Network connectivity e.g. proxies, DNS, and SSL question Asking for clarification or support
Projects
None yet
Development

No branches or pull requests

5 participants