gaborbernat on main
[pre-commit.ci] pre-commit auto… (compare)
gaborbernat on pre-commit-ci-update-config
107 get PythonInfo from /home/miguel/.local/share/virtualenv/py_info/20.0.20/e7370f93d1d0cde622a1f8e1c04877d8463912d04d973331ad4851f04de6915a.json for /bin/python [DEBUG cached_py_info:79]
107 Attempting to release lock 139722758691856 on /home/miguel/.local/share/virtualenv/py_info/20.0.20/e7370f93d1d0cde622a1f8e1c04877d8463912d04d973331ad4851f04de6915a.lock [DEBUG filelock:315]
108 Lock 139722758691856 released on /home/miguel/.local/share/virtualenv/py_info/20.0.20/e7370f93d1d0cde622a1f8e1c04877d8463912d04d973331ad4851f04de6915a.lock [INFO filelock:318]
108 proposed PathPythonInfo(spec=CPython2.7.18.candidate.1-64, exe=/bin/python, platform=linux2, version='2.7.18rc1 (default, Apr 7 2020, 12:05:55) \n[GCC 9.3.0]', encoding_fs_io=UTF-8-None) [INFO builtin:50]
108 discover PATH[7]=/usr/games [DEBUG builtin:84]
108 discover PATH[8]=/usr/local/games [DEBUG builtin:84]
109 discover PATH[9]=/snap/bin [DEBUG builtin:84]
109 RuntimeError: failed to find interpreter for Builtin discover of python_spec='python3.7' [ERROR __main__:57]
python3 -m venv
there to stay.
Hey people. When running my tests with tox in a virtualenv I run into ImportMismatchError, e.g.: ImportMismatchError: ('tfields.main', '/builds/dboe/tfields/.tox/py37/lib/python3.7/site-packages/tfields/main.py', local('/builds/dboe/tfields/tfields/main.py'). Any hints? I keep coming back to https://stackoverflow.com/questions/44067609/getting-error-importmismatcherror-while-running-py-test but am not sure a) if that is my problem and b) how to remove __pycache__ within tox environments
see https://gitlab.mpcdf.mpg.de/dboe/tfields/-/jobs/1121415 for the failing example. It seems like python is confusing the local import with a 3rd party import
virtualenv
with --system-site-packages
option, my global packages are visible in the environment but I cannot access environment packages (like tqdm
) from command line. I need to specify python -m <package-name>
to access them. Maybe the path of environment packages did not get added to sys.path
. Can someone help to interpret this behaviour?
$ uname -a
Darwin My_MacBook 19.6.0 Darwin Kernel Version 19.6.0: Thu Jun 18 20:49:00 PDT 2020; root:xnu-6153.141.1~1/RELEASE_X86_64 x86_64
$ which python3; python3 --version
/usr/local/bin/python3
Python 3.8.5
$ which virtualenv; virtualenv --version
/usr/local/bin/virtualenv
virtualenv 20.0.31 from /usr/local/lib/python3.8/site-packages/virtualenv/__init__.py
$ virtualenv no_global
$ source no_global/bin/activate
(no_global) $ python -c "import sys; print(sys.executable)"
/Users/user/no_global/bin/python
$ virtualenv --system-site-packages with_global
$ source with_global/bin/activate
(with_global) $ python -c "import sys; print(sys.executable)"
/usr/local/opt/python@3.8/bin/python3.8
system-site-packages
is unable to find tqdm. The path inside both environments does include the path for environment packages. So, path is not the issue I guess. Is this the expect behaviour or am I missing something?
install_wheel
was removed. Is there a reason for this, and a replacement for the install_wheel
function? To repro this, install Virtualenv 16.x, and run from virtualenv import install_wheel
. Then upgrade to Vitualenv 20.x and run from virtualenv import install_wheel
. The first line succeeds, while the second fails. Thanks!
virtualenv
.
Is it intended behavior? I thought that if I’m passing a specific file, there should not be any conflicts between installed versions.
python3-virtualenv
installed, but if I do, it fails with ModuleNotFoundError
.