I installed Python 3.7.0 from source inside /opt/python-3.7.0 (make install as root).
Then I created a virtual environment for a package and tried to develop the package.
Python 3.7.0 tries to create a file
/opt/python-3.7.0/lib/python3.7/lib2to3/Grammar3.7.0.final.0.pickle
which fails obviously because the installation directory is owned by root and is not writable for an normal user account
(my-3.7) ajung@dev ~/src/zopyx.txng3.ext (master) $ /opt/python-3.7.0/bin/python3 -m venv .
(my-3.7) ajung@dev ~/src/zopyx.txng3.ext (master) $ bin/python
Python 3.7.0 (default, Jul 25 2018, 16:08:13)
[GCC 7.3.1 20180130 (Red Hat 7.3.1-2)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
(my-3.7) ajung@dev ~/src/zopyx.txng3.ext (master) $ bin/python setup.py develop
running develop
running egg_info
writing zopyx.txng3.ext.egg-info/PKG-INFO
writing dependency_links to zopyx.txng3.ext.egg-info/dependency_links.txt
writing namespace_packages to zopyx.txng3.ext.egg-info/namespace_packages.txt
writing requirements to zopyx.txng3.ext.egg-info/requires.txt
writing top-level names to zopyx.txng3.ext.egg-info/top_level.txt
error: [Errno 13] Permission denied: '/opt/python-3.7.0/lib/python3.7/lib2to3/Grammar3.7.0.final.0.pickle' |