Reputation: 1516
I am attempting to run this command during the heroku-flask tutorial
sudo pip freeze > requirements.txt
I still receive the below message
bash: requirements.txt: Permission denied
Upvotes: 6
Views: 7103
Reputation: 1
The parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip
with sudo
, you may want sudo
's -H
flag.
Try using
sudo -H sh -c 'sudo pip freeze > requirements.txt'
Upvotes: 0
Reputation: 6729
looks like you don't have write permission in the folder your working in. This should solve the issue.
sudo sh -c 'sudo pip freeze > requirements.txt'
Upvotes: 9