Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to symlink '/usr/bin/python3' to '/home/ubuntu/my-env/bin/python3'

I have Django application which is getting deployed on Code Deploy.

In logs i get an error saying 'Unable to symlink '/usr/bin/python3' to '/home/ubuntu/my-env/bin/python3'

Any clues anyone, how to fix this issue,,..?

like image 305
Mitesh Upadhyay Avatar asked Apr 10 '26 03:04

Mitesh Upadhyay


1 Answers

It is possible that your virtualenv exists already, hence the symlink fails to get created (again).

Check if this exists: /home/ubuntu/my-env/bin/python3.

If so, you can remove it, recreate it and then re-install you requirements like so:

rm -rf /home/ubuntu/my-env        # delete existing
$(which python3) -m venv my-env   # create new virtual environment
source my-env/bin/activate        # activate the new environment
pip install -r requirements.txt   # install existing requirements
like image 84
kev Avatar answered Apr 12 '26 15:04

kev