Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pip freeze > requirements.txt - permission denied with sudo? (heroku- flask tutorial)

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
like image 317
phillipsK Avatar asked Mar 19 '23 19:03

phillipsK


1 Answers

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'
like image 87
Ashoka Lella Avatar answered Apr 05 '23 23:04

Ashoka Lella