-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Symlinking Python interpreter fails due to different filesystem #11927
Comments
How are you determining this? We shouldn't be hard-linking the Python interpreter, we always use symlinks on Unix uv/crates/uv-virtualenv/src/virtualenv.rs Lines 160 to 184 in 53d1a7a
|
A symlink across such file systems (the host with the usual ext4 file system) and the CIFS one (under the Python 3.12.4 | (main, Jun 17 2024, 10:23:07) [GCC 12.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pathlib import Path
>>> Path("/home/redacted/smb_share/TeamMembers/redacted/uv_project/test.txt").symlink_to(Path("/home/redacted/test.txt"))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/redacted/miniforge3/lib/python3.12/pathlib.py", line 1386, in symlink_to
os.symlink(target, self, target_is_directory)
OSError: [Errno 95] Operation not supported: '/home/francoishardy/test.txt' -> '/home/redacted/smb_share/TeamMembers/redacted/uv_project/test.txt' I figured the issue was with the Python symlink, since I get the exact same error when running
|
Does |
Sadly no, would it make it not be supported then?
|
Does |
Same error once again
|
It sounds like you need #7865 |
I don't think that's sufficient (it might be necessary though). I think the error they're seeing here is that the distro symlinks |
Specifying the Python isntallation directory did not seem to fix the problem (or this is a different problem). I set the installation directory as one inside the
|
There are symlinks in the Python installation itself, yeah, e.g.
Unfortunately this seems painful to fix. I guess we'd need to add opt-in copy fallback to the tar crate? |
I understand my specific usecase is very uncommon, if this is out of scope of the project I would understand and advise to move the project outside of the CIFS file system. |
Summary
When creating a new virtual environment in a directory that is inside a different filesystem than the Python interpreter,
uv sync
fails even with link mode set as copy.The way our infrastructure is set, the directory
smb_share/
inside the/home/redacted/
is actually a CIFS mount to a Windows based file system. Creating the virtual environment fails at the linking of the Python interpreter, since the executable is inside the "main" file system.How would I go about installing the Python executable either inside the project's
.venv
, or on the same file system?The verbose debug log when syncing the environment, if it helps:
Platform
Ubuntu 22.04.5 LTS x86_64
Version
uv 0.6.3
Python version
Python 3.12.4
The text was updated successfully, but these errors were encountered: