Open Helyux opened 1 year ago
Have you tried passing this just as a regular --index
url option or --pypi-mirror
url? I think with the way we have customized the resolver, what you are trying to do wouldn't work with extra pip args, as you point out.
Hello Matteius, I'll give it a try on Monday. Thank you for the suggestion. I'm curious about why it's included as an example in the documentation then. Am I perhaps misunderstanding something? advanced/
The doc example is for sync which is skipping a lock resolution phase. It turns out extra pip args were never passed to the resolver, but I have a PR out that does this and I am looking for feedback on the various use cases. https://github.com/pypa/pipenv/pull/6006
Passing the proxy address to --index
(pipenv install --index 127.0.0.1:3128 numpy)
resulted in the same 407's as without any args.
Passing to --pypi-mirror
resulted in Error: Invalid value for '--pypi-mirror': Invalid PyPI mirror URL: 127.0.0.1:3128
Sadly i don't know how to update my pipenv.exe to your patched version, if you can give me a pointer on that i'm more then happy to test.
@Helyux Does your proxy require authentication parameters? https://stackoverflow.com/questions/46466241/pip-install-failing-with-407-proxy-authentication-required
It does but that's what the px proxy is for, it automatically handles the authentication, see my initial comment.
@Helyux to try the branch:
pip uninstall pipenv --yes
pip install git+https://github.com/pypa/pipenv.git@issue-6001-extra-pip-args
@Helyux I'd be curious what your result with this is on 2024.3.0
?
Hi @matteius, sadly i'm unable to test & reproduce now due to new corporate restrictions. Feel free to close the issue if you see no further need for it.
Issue description
Can't install a package behind a proxy using the
--extra-pip-args
flag. The locking fails withpipenv.exceptions.ResolutionFailure
.following pip command works:
pip install --proxy 127.0.0.1:3128 numpy
following pipenv command doesn't:pipenv install --extra-pip-args="--proxy=127.0.0.1:3128" numpy
Important detail: I'm utilizing a Px proxy to bypass the actual NTLM proxy. The 407 errors listed below are the results I encounter when attempting a basic
pipenv install numpy
. That's why I suspect that the Px proxy I provided isn't being utilized.Expected result
Package gets added to pipfile and the pipfile.lock is updated.
Actual result
Steps to replicate
Create a new project
pipenv install
Install a package passing a proxypipenv install --extra-pip-args="--proxy=127.0.0.1:3128" numpy
$ pipenv --support
Pipenv version: `'2023.10.24'` Pipenv location: `'C:\\Users\\helyux\\AppData\\Roaming\\Python\\Python310\\site-packages\\pipenv'` Python location: `'C:\\Program Files\\Python310\\python.exe'` OS Name: `'nt'` User pip version: `'23.3.1'` user Python installations found: PEP 508 Information: ``` {'implementation_name': 'cpython', 'implementation_version': '3.10.6', 'os_name': 'nt', 'platform_machine': 'AMD64', 'platform_python_implementation': 'CPython', 'platform_release': '10', 'platform_system': 'Windows', 'platform_version': '10.0.22000', 'python_full_version': '3.10.6', 'python_version': '3.10', 'sys_platform': 'win32'} ``` System environment variables: - `ALLUSERSPROFILE` - `APPDATA` - `COMMONPROGRAMFILES` - `COMMONPROGRAMFILES(X86)` - `COMMONPROGRAMW6432` - `COMPUTERNAME` - `COMSPEC` - `DRIVERDATA` - `FPS_BROWSER_APP_PROFILE_STRING` - `FPS_BROWSER_USER_PROFILE_STRING` - `GOPATH` - `HOME` - `HOMEDRIVE` - `HOMEPATH` - `HOMESHARE` - `JAVA_HOME` - `LOCALAPPDATA` - `LOGONSERVER` - `MAGICK_HOME` - `NUMBER_OF_PROCESSORS` - `ONEDRIVE` - `OS` - `PATH` - `PATHEXT` - `PROCESSOR_ARCHITECTURE` - `PROCESSOR_IDENTIFIER` - `PROCESSOR_LEVEL` - `PROCESSOR_REVISION` - `PROGRAMDATA` - `PROGRAMFILES` - `PROGRAMFILES(X86)` - `PROGRAMW6432` - `PROMPT` - `PSMODULEPATH` - `PUBLIC` - `PYCHARM COMMUNITY EDITION` - `SESSIONNAME` - `SYSTEMDRIVE` - `SYSTEMROOT` - `TEMP` - `TMP` - `USERDNSDOMAIN` - `USERDOMAIN` - `USERDOMAIN_ROAMINGPROFILE` - `USERNAME` - `USERPROFILE` - `WINDIR` - `PIP_DISABLE_PIP_VERSION_CHECK` - `PYTHONDONTWRITEBYTECODE` - `PYTHONFINDER_IGNORE_UNSUPPORTED` Pipenvûspecific environment variables: Debugûspecific environment variables: --------------------------- Contents of `Pipfile` ('C:\\Users\\helyux\\Desktop\\Aiden\\Pipfile'): ```toml [[source]] url = "https://pypi.org/simple" verify_ssl = true name = "pypi" [packages] [dev-packages] [requires] python_version = "3.10" ``` Contents of `Pipfile.lock` ('C:\\Users\\helyux\\Desktop\\Aiden\\Pipfile.lock'): ```json { "_meta": { "hash": { "sha256": "fedbd2ab7afd84cf16f128af0619749267b62277b4cb6989ef16d4bef6e4eef2" }, "pipfile-spec": 6, "requires": { "python_version": "3.10" }, "sources": [ { "name": "pypi", "url": "https://pypi.org/simple", "verify_ssl": true } ] }, "default": {}, "develop": {} } ```