-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python binaries in (venv)/usr/local/bin instead of (venv)/bin #2319
Comments
Can you do |
That seemed to have resolved the issue, thank you! ... % virtualenv --reset-app-data venv -vvvv
122 setup logging to NOTSET [DEBUG report:39]
123 reset app data folder /Users/jleow/Library/Application Support/virtualenv [DEBUG via_disk_folder:62]
130 find interpreter for spec PythonSpec(path=/usr/local/Cellar/virtualenv/20.13.3/libexec/bin/python3.10) [INFO builtin:62]
130 discover exe for PythonInfo(spec=CPython3.10.2.final.0-64, exe=/usr/local/Cellar/virtualenv/20.13.3/libexec/bin/python3.10, platform=darwin, version='3.10.2 (main, Feb 2 2022, 08:42:42) [Clang 13.0.0 (clang-1300.0.29.3)]', encoding_fs_io=utf-8-utf-8) in /usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10 [DEBUG py_info:403]
132 filesystem is not case-sensitive [DEBUG info:29]
133 Attempting to acquire lock 4346417584 on /Users/jleow/Library/Application Support/virtualenv/py_info/1/b8e52a04cfe0eb96c81bc564c72a42e3a2329554ef3b7cfaf02c2c534aecd5ba.lock [DEBUG _api:169]
133 Lock 4346417584 acquired on /Users/jleow/Library/Application Support/virtualenv/py_info/1/b8e52a04cfe0eb96c81bc564c72a42e3a2329554ef3b7cfaf02c2c534aecd5ba.lock [DEBUG _api:173]
133 get interpreter info via cmd: /usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/bin/python3.10 /usr/local/Cellar/virtualenv/20.13.3/libexec/lib/python3.10/site-packages/virtualenv/discovery/py_info.py [DEBUG cached_py_info:91]
196 wrote python info of /usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/bin/python3.10 at /Users/jleow/Library/Application Support/virtualenv/py_info/1/b8e52a04cfe0eb96c81bc564c72a42e3a2329554ef3b7cfaf02c2c534aecd5ba.json [DEBUG via_disk_folder:161]
196 Attempting to release lock 4346417584 on /Users/jleow/Library/Application Support/virtualenv/py_info/1/b8e52a04cfe0eb96c81bc564c72a42e3a2329554ef3b7cfaf02c2c534aecd5ba.lock [DEBUG _api:203]
196 Lock 4346417584 released on /Users/jleow/Library/Application Support/virtualenv/py_info/1/b8e52a04cfe0eb96c81bc564c72a42e3a2329554ef3b7cfaf02c2c534aecd5ba.lock [DEBUG _api:206]
197 Attempting to acquire lock 4346417488 on /Users/jleow/Library/Application Support/virtualenv/py_info/1/8f9328efe3468e6c370cdfed98702d3986faf748314d5bcec59da615d65baa7a.lock [DEBUG _api:169]
197 Lock 4346417488 acquired on /Users/jleow/Library/Application Support/virtualenv/py_info/1/8f9328efe3468e6c370cdfed98702d3986faf748314d5bcec59da615d65baa7a.lock [DEBUG _api:173]
197 get interpreter info via cmd: /usr/local/opt/python@3.10/bin/python3.10 /usr/local/Cellar/virtualenv/20.13.3/libexec/lib/python3.10/site-packages/virtualenv/discovery/py_info.py [DEBUG cached_py_info:91]
262 wrote python info of /usr/local/opt/python@3.10/bin/python3.10 at /Users/jleow/Library/Application Support/virtualenv/py_info/1/8f9328efe3468e6c370cdfed98702d3986faf748314d5bcec59da615d65baa7a.json [DEBUG via_disk_folder:161]
262 Attempting to release lock 4346417488 on /Users/jleow/Library/Application Support/virtualenv/py_info/1/8f9328efe3468e6c370cdfed98702d3986faf748314d5bcec59da615d65baa7a.lock [DEBUG _api:203]
262 Lock 4346417488 released on /Users/jleow/Library/Application Support/virtualenv/py_info/1/8f9328efe3468e6c370cdfed98702d3986faf748314d5bcec59da615d65baa7a.lock [DEBUG _api:206]
262 proposed PythonInfo(spec=CPython3.10.2.final.0-64, system=/usr/local/opt/python@3.10/bin/python3.10, exe=/usr/local/Cellar/virtualenv/20.13.3/libexec/bin/python3.10, platform=darwin, version='3.10.2 (main, Feb 2 2022, 08:42:42) [Clang 13.0.0 (clang-1300.0.29.3)]', encoding_fs_io=utf-8-utf-8) [INFO builtin:69]
262 accepted PythonInfo(spec=CPython3.10.2.final.0-64, system=/usr/local/opt/python@3.10/bin/python3.10, exe=/usr/local/Cellar/virtualenv/20.13.3/libexec/bin/python3.10, platform=darwin, version='3.10.2 (main, Feb 2 2022, 08:42:42) [Clang 13.0.0 (clang-1300.0.29.3)]', encoding_fs_io=utf-8-utf-8) [DEBUG builtin:71]
354 create virtual environment via CPython3Posix(dest=/private/tmp/venv, clear=False, no_vcs_ignore=False, global=False) [INFO session:52]
354 create folder /private/tmp/venv/bin [DEBUG _sync:24]
354 create folder /private/tmp/venv/lib/python3.10/site-packages [DEBUG _sync:24]
355 write /private/tmp/venv/pyvenv.cfg [DEBUG pyenv_cfg:34]
355 home = /usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10 [DEBUG pyenv_cfg:38]
355 implementation = CPython [DEBUG pyenv_cfg:38]
355 version_info = 3.10.2.final.0 [DEBUG pyenv_cfg:38]
355 virtualenv = 20.13.3 [DEBUG pyenv_cfg:38]
355 include-system-site-packages = false [DEBUG pyenv_cfg:38]
355 base-prefix = /usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10 [DEBUG pyenv_cfg:38]
355 base-exec-prefix = /usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10 [DEBUG pyenv_cfg:38]
355 base-executable = /usr/local/opt/python@3.10/bin/python3.10 [DEBUG pyenv_cfg:38]
355 symlink /usr/local/opt/python@3.10/bin/python3.10 to /private/tmp/venv/bin/python [DEBUG _sync:43]
356 create virtualenv import hook file /private/tmp/venv/lib/python3.10/site-packages/_virtualenv.pth [DEBUG api:95]
356 create /private/tmp/venv/lib/python3.10/site-packages/_virtualenv.py [DEBUG api:98]
357 ============================== target debug ============================== [DEBUG session:54]
357 debug via /private/tmp/venv/bin/python /usr/local/Cellar/virtualenv/20.13.3/libexec/lib/python3.10/site-packages/virtualenv/create/debug.py [DEBUG creator:224]
357 {
"sys": {
"executable": "/private/tmp/venv/bin/python",
"_base_executable": "/private/tmp/venv/bin/python",
"prefix": "/private/tmp/venv",
"base_prefix": "/usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10",
"real_prefix": null,
"exec_prefix": "/private/tmp/venv",
"base_exec_prefix": "/usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10",
"path": [
"/usr/local/Cellar/python@3.10/3.10.2/Frameworks/Python.framework/Versions/3.10/lib/python310.zip",
"/usr/local/Cellar/python@3.10/3.10.2/Frameworks/Python.framework/Versions/3.10/lib/python3.10",
"/usr/local/Cellar/python@3.10/3.10.2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/lib-dynload",
"/private/tmp/venv/lib/python3.10/site-packages"
],
"meta_path": [
"<class '_virtualenv._Finder'>",
"<class '_frozen_importlib.BuiltinImporter'>",
"<class '_frozen_importlib.FrozenImporter'>",
"<class '_frozen_importlib_external.PathFinder'>"
],
"fs_encoding": "utf-8",
"io_encoding": "utf-8"
},
"version": "3.10.2 (main, Feb 2 2022, 08:42:42) [Clang 13.0.0 (clang-1300.0.29.3)]",
"makefile_filename": "/usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/lib/python3.10/config-3.10-darwin/Makefile",
"os": "<module 'os' from '/usr/local/Cellar/python@3.10/3.10.2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/os.py'>",
"site": "<module 'site' from '/usr/local/Cellar/python@3.10/3.10.2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site.py'>",
"datetime": "<module 'datetime' from '/usr/local/Cellar/python@3.10/3.10.2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/datetime.py'>",
"math": "<module 'math' from '/usr/local/Cellar/python@3.10/3.10.2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/lib-dynload/math.cpython-310-darwin.so'>",
"json": "<module 'json' from '/usr/local/Cellar/python@3.10/3.10.2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/__init__.py'>"
} [DEBUG session:55]
408 add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/jleow/Library/Application Support/virtualenv) [INFO session:59]
410 wrote embed update of distribution pip at /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/embed/3/pip.json [DEBUG via_disk_folder:161]
413 wrote embed update of distribution setuptools at /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/embed/3/setuptools.json [DEBUG via_disk_folder:161]
413 triggered periodic upgrade of pip==22.0.4 (for python 3.10) via background process having PID 34223 [INFO periodic_update:233]
414 wrote embed update of distribution wheel at /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/embed/3/wheel.json [DEBUG via_disk_folder:161]
417 triggered periodic upgrade of setuptools==60.9.3 (for python 3.10) via background process having PID 34224 [INFO periodic_update:233]
419 triggered periodic upgrade of wheel==0.37.1 (for python 3.10) via background process having PID 34225 [INFO periodic_update:233]
421 got embed update of distribution pip from /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/embed/3/pip.json [DEBUG via_disk_folder:135]
422 got embed update of distribution wheel from /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/embed/3/wheel.json [DEBUG via_disk_folder:135]
426 got embed update of distribution setuptools from /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/embed/3/setuptools.json [DEBUG via_disk_folder:135]
428 install pip from wheel /usr/local/Cellar/virtualenv/20.13.3/libexec/lib/python3.10/site-packages/virtualenv/seed/wheels/embed/pip-22.0.4-py3-none-any.whl via CopyPipInstall [DEBUG via_app_data:49]
428 install wheel from wheel /usr/local/Cellar/virtualenv/20.13.3/libexec/lib/python3.10/site-packages/virtualenv/seed/wheels/embed/wheel-0.37.1-py2.py3-none-any.whl via CopyPipInstall [DEBUG via_app_data:49]
428 install setuptools from wheel /usr/local/Cellar/virtualenv/20.13.3/libexec/lib/python3.10/site-packages/virtualenv/seed/wheels/embed/setuptools-60.9.3-py3-none-any.whl via CopyPipInstall [DEBUG via_app_data:49]
429 Attempting to acquire lock 4347394512 on /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/pip-22.0.4-py3-none-any.lock [DEBUG _api:169]
429 Attempting to acquire lock 4347394320 on /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/wheel-0.37.1-py2.py3-none-any.lock [DEBUG _api:169]
429 Attempting to acquire lock 4347393456 on /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/setuptools-60.9.3-py3-none-any.lock [DEBUG _api:169]
429 Lock 4347394512 acquired on /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/pip-22.0.4-py3-none-any.lock [DEBUG _api:173]
429 Lock 4347394320 acquired on /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/wheel-0.37.1-py2.py3-none-any.lock [DEBUG _api:173]
430 build install image for pip-22.0.4-py3-none-any.whl to /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/pip-22.0.4-py3-none-any [DEBUG base:49]
430 build install image for wheel-0.37.1-py2.py3-none-any.whl to /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/wheel-0.37.1-py2.py3-none-any [DEBUG base:49]
430 Lock 4347393456 acquired on /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/setuptools-60.9.3-py3-none-any.lock [DEBUG _api:173]
430 build install image for setuptools-60.9.3-py3-none-any.whl to /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/setuptools-60.9.3-py3-none-any [DEBUG base:49]
465 Attempting to release lock 4347394320 on /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/wheel-0.37.1-py2.py3-none-any.lock [DEBUG _api:203]
465 Lock 4347394320 released on /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/wheel-0.37.1-py2.py3-none-any.lock [DEBUG _api:206]
467 copy /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/wheel-0.37.1-py2.py3-none-any/wheel-0.37.1.virtualenv to /private/tmp/venv/lib/python3.10/site-packages/wheel-0.37.1.virtualenv [DEBUG _sync:51]
468 copy directory /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/wheel-0.37.1-py2.py3-none-any/wheel to /private/tmp/venv/lib/python3.10/site-packages/wheel [DEBUG _sync:51]
497 copy directory /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/wheel-0.37.1-py2.py3-none-any/wheel-0.37.1.dist-info to /private/tmp/venv/lib/python3.10/site-packages/wheel-0.37.1.dist-info [DEBUG _sync:51]
515 generated console scripts wheel3.10 wheel wheel-3.10 wheel3 [DEBUG base:45]
622 Attempting to release lock 4347393456 on /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/setuptools-60.9.3-py3-none-any.lock [DEBUG _api:203]
622 Lock 4347393456 released on /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/setuptools-60.9.3-py3-none-any.lock [DEBUG _api:206]
623 copy directory /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/setuptools-60.9.3-py3-none-any/setuptools-60.9.3.dist-info to /private/tmp/venv/lib/python3.10/site-packages/setuptools-60.9.3.dist-info [DEBUG _sync:51]
630 copy /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/setuptools-60.9.3-py3-none-any/distutils-precedence.pth to /private/tmp/venv/lib/python3.10/site-packages/distutils-precedence.pth [DEBUG _sync:51]
632 copy /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/setuptools-60.9.3-py3-none-any/setuptools-60.9.3.virtualenv to /private/tmp/venv/lib/python3.10/site-packages/setuptools-60.9.3.virtualenv [DEBUG _sync:51]
633 copy directory /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/setuptools-60.9.3-py3-none-any/setuptools to /private/tmp/venv/lib/python3.10/site-packages/setuptools [DEBUG _sync:51]
776 copy directory /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/setuptools-60.9.3-py3-none-any/pkg_resources to /private/tmp/venv/lib/python3.10/site-packages/pkg_resources [DEBUG _sync:51]
832 Attempting to release lock 4347394512 on /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/pip-22.0.4-py3-none-any.lock [DEBUG _api:203]
832 Lock 4347394512 released on /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/pip-22.0.4-py3-none-any.lock [DEBUG _api:206]
833 copy directory /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/pip-22.0.4-py3-none-any/pip-22.0.4.dist-info to /private/tmp/venv/lib/python3.10/site-packages/pip-22.0.4.dist-info [DEBUG _sync:51]
835 copy directory /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/setuptools-60.9.3-py3-none-any/_distutils_hack to /private/tmp/venv/lib/python3.10/site-packages/_distutils_hack [DEBUG _sync:51]
838 generated console scripts [DEBUG base:45]
839 copy directory /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/pip-22.0.4-py3-none-any/pip to /private/tmp/venv/lib/python3.10/site-packages/pip [DEBUG _sync:51]
1171 copy /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/pip-22.0.4-py3-none-any/pip-22.0.4.virtualenv to /private/tmp/venv/lib/python3.10/site-packages/pip-22.0.4.virtualenv [DEBUG _sync:51]
1173 generated console scripts pip-3.10 pip3 pip3.10 pip [DEBUG base:45]
1173 add activators for Bash, CShell, Fish, Nushell, PowerShell, Python [INFO session:64]
1181 write /private/tmp/venv/pyvenv.cfg [DEBUG pyenv_cfg:34]
1181 home = /usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10 [DEBUG pyenv_cfg:38]
1181 implementation = CPython [DEBUG pyenv_cfg:38]
1181 version_info = 3.10.2.final.0 [DEBUG pyenv_cfg:38]
1181 virtualenv = 20.13.3 [DEBUG pyenv_cfg:38]
1181 include-system-site-packages = false [DEBUG pyenv_cfg:38]
1182 base-prefix = /usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10 [DEBUG pyenv_cfg:38]
1182 base-exec-prefix = /usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10 [DEBUG pyenv_cfg:38]
1182 base-executable = /usr/local/opt/python@3.10/bin/python3.10 [DEBUG pyenv_cfg:38]
1182 created virtual environment CPython3.10.2.final.0-64 in 1061ms
creator CPython3Posix(dest=/private/tmp/venv, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/jleow/Library/Application Support/virtualenv)
added seed packages: pip==22.0.4, setuptools==60.9.3, wheel==0.37.1
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator [WARNING __main__:19] There appeared to be some extra junk in my Thank you! |
Hi Bernát. With sincere apologies in advance for commenting on a closed issue, do you have any idea what causes this state to occur? That is, why do some folks have a I ask because several VirtualFish users have reported this problem (justinmayer/virtualfish#232), and as the maintainer of VirtualFish, I would like to know what (if anything) should be done within VirtualFish to handle this situation, even if only to show a warning that the virtual environment is somehow busted. Might you have any suggestions? |
Could be an old/corrupted cache folder, hence why trying
is a good idea. |
It sounds like a situation that shouldn't happen under normal circumstances, and therefore I feel no need to handle it explicitly in VirtualFish. Thanks for the quick reply, Bernát! |
Issue
When creating a virtualenv, I expect the
activate
etc scripts to be in(venv)/bin
, but instead they are going under(venv)/usr/local/bin
I think this PR may be related? #2208 (Though I don't see anything specifically wrong with it)
I've tried troubleshooting this, but am at wits end. The baffling part for me is the
virtualenv.discovery.PythonInfo
'sdistutils_install
dictionary. When I addedprint
statements at the bottom of__init__
, it appears to be set to an emptydict
:https://github.com/pypa/virtualenv/blob/20.13.3/src/virtualenv/discovery/py_info.py#L82
However, when the dictionary is actually being read, it's no longer empty, and I don't see that variable being mutated anywhere:
https://github.com/pypa/virtualenv/blob/20.13.3/src/virtualenv/discovery/py_info.py#L131
Hopefully this information is useful, and please let me know if you need anything else.
Environment
Provide at least:
OS: MacOS Big Sur (11.6.4)
pip list
of the host python wherevirtualenv
is installed:Output of the virtual environment creation
Make sure to run the creation with
-vvv --with-traceback
:The text was updated successfully, but these errors were encountered: