Hi, I am trying to install (deploy) streisand vpn from my nixos. I think I have all the dependencies required, when I run ./util/venv-dependencies.sh ./venv from second step it gives following error.
Collecting virtualenv
Using cached https://files.pythonhosted.org/packages/62/77/6a86ef945ad39aae34aed4cc1ae4a2f941b9870917a974ed7c5b6f137188/virtualenv-16.7.8-py2.py3-none-any.whl
Installing collected packages: virtualenv
ERROR: Could not install packages due to an EnvironmentError: [Errno 30] Read-only file system: '/nix/store/ry7pmp6qc5r3gl7dk3ha3swyankv2hx2-python-2.7.17/lib/python2.7/site-packages/virtualenv.pyc'
python is finding an old version of the package in your environment. (This is intended, nixpkgs will put python packages on PYTHONPATH, and pip will find the packages through this).
What you probably want is a venv for pip to do what it wants, for this I would do something like:
# shell.nix
let
pkgs = import <nixpkgs> {};
python = pkgs.python37;
pythonPackages = python.pkgs;
in
with pkgs;
mkShell {
name = "pip-env";
buildInputs = with pythonPackages; [
# System requirements.
readline
pandas
virtualenvwrapper
# needed for buildilng certain packages
libffi
openssl
gcc
];
src = null;
shellHook = ''
# Allow the use of wheels.
SOURCE_DATE_EPOCH=$(date +%s)
# Augment the dynamic linker path
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${pkgs.ncurses}/lib
VENV=venv
if test ! -d $VENV; then
virtualenv $VENV
fi
source ./$VENV/bin/activate
export PYTHONPATH=`pwd`/$VENV/${python.sitePackages}/:$PYTHONPATH
'';
}