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

Configuring pip in Anaconda (D:\ drive) results in https; instead of https: on Windows 10 #13121

Open
1 task done
Caswellwei opened this issue Dec 21, 2024 · 1 comment
Open
1 task done
Labels
S: awaiting response Waiting for a response/more information type: bug A confirmed bug or unintended behavior

Comments

@Caswellwei
Copy link

Caswellwei commented Dec 21, 2024

Description

When configuring the pip mirror source in my Anaconda environment (installed on the D:\ drive), I noticed that the URL in the pip.ini file is misinterpreted, displaying https; (with a semicolon) instead of https: (with a colon). This causes pip commands to fail.

Expected behavior

Pip should correctly interpret https:// (colon) instead of https;// (semicolon), allowing me to install Python packages using the specified mirror.

pip version

Pip Version: 23.3.1

Python version

Python Version: 3.12.4

OS

Windows 10 64-bit

How to Reproduce

Steps to Reproduce
My Anaconda is installed in D:\Anaconda1.
I added the following content toD:\Anaconda1\pip\pip.ini:

[global]
index-url = https;//pypi.douban.com/simple
Ran the following command in the Anaconda prompt:

pip install numpy
Encountered the following warning and error:

WARNING: The index url "https;//pypi.douban.com/simple" seems invalid, please provide a scheme.

Analysis
I confirmed that my pip.ini file contains the following content:

[global]
index-url = https;//pypi.douban.com/simple
However, when I run pip commands, the https:// is incorrectly interpreted as https;//.
The issue seems to persist regardless of the corrections I make to the pip.ini file.

Output

Attempts to Resolve
I have already tried the following steps, but the issue persists:

Updated the URL in the pip.ini file to the following format:

[global]
index-url = https://pypi.douban.com/simple
Verified the location of pip.ini and ensured it is in the correct directory (D:\Anaconda1\pip).
Verified that pip is pointing to the correct Python environment in D:\Anaconda1.

Code of Conduct

@Caswellwei Caswellwei added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Dec 21, 2024
@pfmoore
Copy link
Member

pfmoore commented Dec 21, 2024

[global]
index-url = https;//pypi.douban.com/simple

I'm confused. This is an invalid URL. Pip is reading it and trying to use it, but as it's invalid, pip gives an error explaining the problem.

If you fix your config, the problem should go away.

@ichard26 ichard26 added S: awaiting response Waiting for a response/more information and removed S: needs triage Issues/PRs that need to be triaged labels Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S: awaiting response Waiting for a response/more information type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

No branches or pull requests

4 participants
@pfmoore @ichard26 @Caswellwei and others