If the filesystem does not support symlinks (i.e. FAT) the exception is unhandled and the process exits - leaving the virtual environment structure unfinished. The issue can be worked around by creating a directory in the symlink's location before invoking venv (
Ideally venv would do a similar check to virtualenv or silently ignore the exception as this is just for POSIX compatibility purposes anyway (and the edge-case is already ignored of the directory existing).
It seems like --copies shouldn't create symlinks anyway; can you provide the traceback? I don't have a windows system but i can look into this. Do you also get the same error with --symlinks ?
[Edit: after posting I think I realized what you meant -- --copies does copy for some files but not for lib64. Should it also copy lib64?]
It shouldn't copy lib64 because it symlinks to lib, so you're effectively copying site-packages which doesn't make sense since you now have two different places to potentially install which won't work.
I think the real question is whether when people say --copies on Unix are they saying they don't want any symlinks or simply to not even attempt because I expect symlinking to fail? If it's the former then symlinking should be skipped, but if it's the latter then for compatibility the exception for failure should just be caught and ignored.
The lib64 -> lib symlink that fails here was removed from venv entirely in 3.15 (gh-133951, #137139, commit a7a485558c0), so venv no longer creates that symlink and the unguarded failure on filesystems without symlink support (FAT, CIFS) can't occur — a venv on main now has only lib. That matches the point above that symlinking/copying lib64 doesn't make sense.
Recommend closing as resolved (fixed by gh-133951).
Activity
akulakov commented on Dec 15, 2022
It seems like --copies shouldn't create symlinks anyway; can you provide the traceback? I don't have a windows system but i can look into this. Do you also get the same error with --symlinks ?
[Edit: after posting I think I realized what you meant -- --copies does copy for some files but not for lib64. Should it also copy lib64?]
brettcannon commented on Mar 5, 2023
It shouldn't copy lib64 because it symlinks to lib, so you're effectively copying site-packages which doesn't make sense since you now have two different places to potentially install which won't work.
I think the real question is whether when people say --copies on Unix are they saying they don't want any symlinks or simply to not even attempt because I expect symlinking to fail? If it's the former then symlinking should be skipped, but if it's the latter then for compatibility the exception for failure should just be caught and ignored.
gaborbernat commented on Jun 5, 2026
The lib64 -> lib symlink that fails here was removed from venv entirely in 3.15 (gh-133951, #137139, commit a7a485558c0), so venv no longer creates that symlink and the unguarded failure on filesystems without symlink support (FAT, CIFS) can't occur — a venv on main now has only lib. That matches the point above that symlinking/copying lib64 doesn't make sense.
Recommend closing as resolved (fixed by gh-133951).