In today's episode of dumb shit that made me write a blog post...
I finally got around to trying to figure out why I couldn't create a virtual environment (venv) using Pycharm for my Python class project folder. I keep it on a USB drive because I do some work on it both at home and on my work laptop (when I'm not working through lunch, natch.)
Anyway, I kept getting the following error: permissionerror: [errno 1] operation not permitted: 'lib' -> (and then the path to a symlink to lib64.)
I figured it was an issue with my locked down work laptop, so I just kept manually navigating to a local python interpreter at work. I said I'd get around to fixing it when I got home. But low and behold, same shit at home.
I tried manually running the command that PyCharm uses so that I could "sudo" it (thinking it was a permissions error. That simple solution, of course, wasn't the issue.
The error is ACTUALLY caused by the fact that my USB drive was FAT32. For some reason (beyond my knowledge level) you can't create symlinks using FAT32. The fix is to reformat your drive into something that's a little more modern.
Since I need to use this drive on both my work machine (Win10) and home (Debian), I went with NTFS. Wango, bango I was able to install the new venv on the USB drive on the first go after I had reformatted the drive.
Luckily, I had recently started using a sync tool called Unison to keep my USB drive synced up with my desktop due to a catastrophic loss of my drive data (during Finals week of my last Python course) that was caused by my wife putting a little percussive force on the door of my desk while trying to move a carpet. Snapped a few pins off of the drive connection to the board that my shitty, shitty soldering skills couldn't fix. But, it had the positive effect of getting me to finally start backing my shit up properly, haha.
So, if you too are having a problem setting up a venv on a thumb drive, fix that FATfuck32 drive and you'll be ready to rock.