nix-shell -p libffi openssl python37Packages.virtualenv python37Packages.virtualenvwrapper python37Packages.pip python37Packages.setuptools
...
Collecting certifi>=2017.4.17 (from requests>=2.21.0->hvac==0.8.2->-r requirements.txt (line 5))
  Using cached https://files.pythonhosted.org/packages/b9/63/df50cac98ea0d5b006c55a399c3bf1db9da7b5a24de7890bc9cfd5dd9e99/certifi-2019.11.28-py2.py3-none-any.whl
Collecting idna<2.9,>=2.5 (from requests>=2.21.0->hvac==0.8.2->-r requirements.txt (line 5))
  Using cached https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl
Collecting pycparser (from cffi!=1.11.3,>=1.8->cryptography->ansible==2.7.12->-r requirements.txt (line 1))
Installing collected packages: MarkupSafe, jinja2, PyYAML, pycparser, cffi, cryptography, bcrypt, pynacl, paramiko, ansible, netaddr, pbr, chardet, urllib3, certifi, idna, requests, hvac, jmespath, ruamel.yaml
ERROR: Could not install packages due to an EnvironmentError: [Errno 30] Read-only file system: '/nix/store/4c3z5r6yxsf2cxwwyazhdn92xixn4j5b-python3-3.7.5/lib/python3.7/site-packages/MarkupSafe-1.1.1.dist-info'

WARNING: You are using pip version 19.2.3, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

有没有什么方法可以让我不用为上面的内容创建某种形式的nix派生呢?

我注意到 python37Packages.bootstrapped-pip 但是这失败了因为我需要 unset SOURCE_DATE_EPOCH 在尼克斯之前这是"尼克斯魔法"。。。

    File "/nix/store/4c3z5r6yxsf2cxwwyazhdn92xixn4j5b-python3-3.7.5/lib/python3.7/zipfile.py", line 357, in __init__
      raise ValueError('ZIP does not support timestamps before 1980')
  ValueError: ZIP does not support timestamps before 1980
最佳回复

一个人可以用 virtualenv 要处理此问题:

python3 -m venv env
source env/bin/activate