I am working on deploying my django application using uwsgi and nginx on a RHEL with pre installed python packages. Server is installed with uwsgi and nginx globally(as root). My server is not connected to internet.
I have secure copied my django project inside this server. For best practices I am told to use virtual environment and when I do the command,
virtualenv -p /usr/local/lib/python3.5/bin/python3.5 venv
All is cool. It creates a virtual environment with python 3.5.
But the problem is, I need these site packages which is pre installed on the server into this virtual environment. Example django, redis etc. When I do the above command with --system-site-packages it throws me this error
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.6/site-packages/wheel-0.29.0.dist-info'
Is there a cleaner way to do this or where is it going wrong `?