After creating python virtual environment virtualenv -p python3 venv and activating it source venv/bin/activate, i am trying to install python packages using pip command-> pip install Flask which throws permission errors:
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/var/www/flask/apnisi/venv/lib/python3.5/site-packages/werkzeug'
Could not install packages due to an EnvironmentError: [Errno 13]
Permission denied: '/var/www/flask/apnisi/venv/lib/python3.5/site-packages/werkzeug'
After adding sudo to pip command sudo pip install Flask installation is successful; however, when i pip list installed packages it doesn't show newly installed ones.
What could be the problem?