Skip to content

pip fails if on network drive. Works on UNC path, but then everything else breaks. #1419

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

Open
CDWimmer opened this issue Sep 26, 2024 · 1 comment

Comments

@CDWimmer
Copy link

I have freshly unpacked the 7zip executable of Winpython64-3.12.4.1dot to a directory: P:\py\ where in P: is a network drive.

Running Winpython Command Prompt.exe to get a shell and then entering pip (or any subcommand thereof) pauses for a few seconds, followed invariably by this lengthy error:

P:\py\WPy64-31241\scripts>pip
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "P:\py\WPy64-31241\python-3.12.4.amd64\Scripts\pip.exe\__main__.py", line 4, in <module>
  File "P:\py\WPy64-31241\python-3.12.4.amd64\Lib\site-packages\pip\_internal\cli\main.py", line 10, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "P:\py\WPy64-31241\python-3.12.4.amd64\Lib\site-packages\pip\_internal\cli\autocompletion.py", line 10, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "P:\py\WPy64-31241\python-3.12.4.amd64\Lib\site-packages\pip\_internal\cli\main_parser.py", line 9, in <module>
    from pip._internal.build_env import get_runnable_pip
  File "P:\py\WPy64-31241\python-3.12.4.amd64\Lib\site-packages\pip\_internal\build_env.py", line 19, in <module>
    from pip._internal.cli.spinners import open_spinner
  File "P:\py\WPy64-31241\python-3.12.4.amd64\Lib\site-packages\pip\_internal\cli\spinners.py", line 9, in <module>
    from pip._internal.utils.logging import get_indentation
  File "P:\py\WPy64-31241\python-3.12.4.amd64\Lib\site-packages\pip\_internal\utils\logging.py", line 29, in <module>
    from pip._internal.utils.misc import ensure_dir
  File "P:\py\WPy64-31241\python-3.12.4.amd64\Lib\site-packages\pip\_internal\utils\misc.py", line 40, in <module>
    from pip._vendor.tenacity import retry, stop_after_delay, wait_fixed
  File "P:\py\WPy64-31241\python-3.12.4.amd64\Lib\site-packages\pip\_vendor\tenacity\__init__.py", line 548, in <module>
    from pip._vendor.tenacity._asyncio import AsyncRetrying  # noqa:E402,I100
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "P:\py\WPy64-31241\python-3.12.4.amd64\Lib\site-packages\pip\_vendor\tenacity\_asyncio.py", line 21, in <module>
    from asyncio import sleep
  File "P:\py\WPy64-31241\python-3.12.4.amd64\Lib\asyncio\__init__.py", line 43, in <module>
    from .windows_events import *
  File "P:\py\WPy64-31241\python-3.12.4.amd64\Lib\asyncio\windows_events.py", line 8, in <module>
    import _overlapped
OSError: [WinError 10022] An invalid argument was supplied

I downloaded a .whl from PyPi to try to install manually using wppm -i but it produced the same error, I guess using pip internally.

I realise "Because Windows" UNC paths are wonky in cmd, so a lot of things fall apart if not on a "proper" <LETTER>: drive, but bizarrely when I separably unpacked WinPython to a UNC location, pip install xyz worked - python itself couldn't find it when trying to import, but the installed package did indeed appear in site-packages.
I then moved that version to a place with a drive letter and it could successfully import, but then pip was broken as above so I couldn't install anything else.

Obviously this is not an ideal set up: install in one location and then relocating the entire installation! What's going on here? What did I break?

@stonebig
Copy link
Contributor

stonebig commented May 4, 2025

try .scripts/make_winpython_movable.bat ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants