You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
venv fails when run on a mounted drive (Windows host / SMB file share)
Environment
Provide at least:
OS: Windows (tested on Win10 and Win11, same behavior)
Python: 3.11.3
pip list of the host python where virtualenv is installed:
python -m pip list
Package Version
------------ -------
distlib 0.3.6
filelock 3.12.0
pip 22.3.1
platformdirs 3.5.1
setuptools 65.5.0
virtualenv 20.23.0
Output of the virtual environment creation
Make sure to run the creation with -vvv --with-traceback:
python -m venv venv
Actual environment location may have moved due to redirects, links or junctions.
Requested location: "X:\path\to\venv\Scripts\python.exe"
Actual location: "\\fileshare\path\to\venv\Scripts\python.exe"
note: it hangs here forever until I press Ctrl-C, then:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Program Files\Python311\Lib\venv\__main__.py", line 6, in <module>
main()
File "C:\Program Files\Python311\Lib\venv\__init__.py", line 546, in main
builder.create(d)
File "C:\Program Files\Python311\Lib\venv\__init__.py", line 76, in create
self._setup_pip(context)
File "C:\Program Files\Python311\Lib\venv\__init__.py", line 358, in _setup_pip
self._call_new_python(context, '-m', 'ensurepip', '--upgrade',
File "C:\Program Files\Python311\Lib\venv\__init__.py", line 354, in _call_new_python
subprocess.check_output(args, **kwargs)
File "C:\Program Files\Python311\Lib\subprocess.py", line 466, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\subprocess.py", line 550, in run
stdout, stderr = process.communicate(input, timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\subprocess.py", line 1194, in communicate
stdout = self.stdout.read()
^^^^^^^^^^^^^^^^^^
I also encountered this issue; however, I found it only hanging because it was still writing to the network. Eventually, the process terminates, and the command line is restored. While I am used to this process happening within a second, it takes much longer to write to the network share. In the end, the error was displayed due to my Ctrl-C.
Issue
venv fails when run on a mounted drive (Windows host / SMB file share)
Environment
Provide at least:
pip list
of the host python wherevirtualenv
is installed:Output of the virtual environment creation
Make sure to run the creation with
-vvv --with-traceback
:note: it hangs here forever until I press Ctrl-C, then:
also note
The text was updated successfully, but these errors were encountered: