By itinneed
I’m trying to follow: https://www.digitalocean.com/community/questions/new?tutorial=how-to-serve-flask-applications-with-gunicorn-and-nginx-on-centos-7
However I can’t seem to setup the virtualenv without using sudo. The problem with that is then I cannot activate the virtualenv as I keep getting permission denied on the activate portion. What do I do?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Heya,
Just came across this answer and decided to write some general guidelines for anyone who comes across this in the future despite the old question.
This problem could be due to lack of permission in your current directory.
Here are a few things you can do to resolve this:
ls -l. If the user and group are not your’s, then you should change the directory to somewhere you have full access to.pip install --upgrade virtualenv.Remember, it’s always best to avoid using sudo when it’s not necessary as it can lead to permission issues like what you’re experiencing now.
For further details, you can visit the Python setup on CentOS guide on DigitalOcean’s community tutorials.
Hope that this helps!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.