Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix 'Unable to symlink' error from using venv on Mac Os X and Google Drive File Stream

The command below will result in different outputs depending if I'm working from a folder on my Desktop or from a Google Drive File Stream folder

Here is the command:

python3 -m venv env

If the folder I'm working from is a Google Drive File Stream folder I get the following error message:

Unable to symlink '/usr/local/bin/python3' to '/Volumes/GoogleDrive/Mon Drive/perso/coding/Python/Environments/env/bin/python3'

But if I do the same from a folder located on my Desktop I got no error message and I can activate/deactivate the venv without any issues at all.

I assume this is somehow related to specific user permissions but I would appreciate your input as I'd rather not mess things up at the OS level.

like image 997
doingmybest Avatar asked Nov 07 '22 18:11

doingmybest


1 Answers

Try using the --copies (--always-copy on python2) argument. This will avoid symlinking altogether.

like image 170
Will Avatar answered Nov 14 '22 21:11

Will