Skip to content
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

Closed
jackgene opened this issue Mar 18, 2022 · 6 comments
Closed

Python binaries in (venv)/usr/local/bin instead of (venv)/bin #2319

jackgene opened this issue Mar 18, 2022 · 6 comments
Labels

Comments

@jackgene
Copy link

jackgene commented Mar 18, 2022

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

... % virtualenv test
created virtual environment CPython3.10.2.final.0-64 in 358ms
  creator CPython3Posix(dest=/private/tmp/test, 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
... % tree test -L 3
test
├── lib
│   └── python3.10
├── pyvenv.cfg
└── usr
    └── local
        ├── bin
        └── lib

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's distutils_install dictionary. When I added print statements at the bottom of __init__, it appears to be set to an empty dict:
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

self.distutils_install during __init__: {}
self.distutils_install during __init__: {}
self.distutils_install during __init__: {}
self.distutils_install during install_path: {'data': 'usr/local', 'headers': 'include/python3.10/UNKNOWN', 'platlib': 'usr/local/lib/python3.10/site-packages', 'purelib': 'usr/local/lib/python3.10/site-packages', 'scripts': 'usr/local/bin'}
self.distutils_install during install_path: {'data': 'usr/local', 'headers': 'include/python3.10/UNKNOWN', 'platlib': 'usr/local/lib/python3.10/site-packages', 'purelib': 'usr/local/lib/python3.10/site-packages', 'scripts': 'usr/local/bin'}
self.distutils_install during install_path: {'data': 'usr/local', 'headers': 'include/python3.10/UNKNOWN', 'platlib': 'usr/local/lib/python3.10/site-packages', 'purelib': 'usr/local/lib/python3.10/site-packages', 'scripts': 'usr/local/bin'}
self.distutils_install during install_path: {'data': 'usr/local', 'headers': 'include/python3.10/UNKNOWN', 'platlib': 'usr/local/lib/python3.10/site-packages', 'purelib': 'usr/local/lib/python3.10/site-packages', 'scripts': 'usr/local/bin'}
# ... about 20 more install_path calls ...

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 where virtualenv is installed:

      Package      Version
      ------------ -------
      cfgv         3.3.1
      distlib      0.3.4
      filelock     3.4.2
      identify     2.4.4
      mercurial    6.1
      nodeenv      1.6.0
      pip          21.3.1
      platformdirs 2.4.1
      pre-commit   2.17.0
      PyYAML       6.0
      setuptools   59.5.0
      six          1.16.0
      toml         0.10.2
      virtualenv   20.13.0
      wheel        0.37.1

Output of the virtual environment creation

Make sure to run the creation with -vvv --with-traceback:

159 setup logging to NOTSET [DEBUG report:39]
165 find interpreter for spec PythonSpec(path=/usr/local/Cellar/virtualenv/20.13.3/libexec/bin/python3.10) [INFO builtin:62]
165 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]
167 filesystem is not case-sensitive [DEBUG info:29]
168 Attempting to acquire lock 4356379104 on /Users/jleow/Library/Application Support/virtualenv/py_info/1/b8e52a04cfe0eb96c81bc564c72a42e3a2329554ef3b7cfaf02c2c534aecd5ba.lock [DEBUG _api:169]
168 Lock 4356379104 acquired on /Users/jleow/Library/Application Support/virtualenv/py_info/1/b8e52a04cfe0eb96c81bc564c72a42e3a2329554ef3b7cfaf02c2c534aecd5ba.lock [DEBUG _api:173]
169 got python info of /usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/bin/python3.10 from /Users/jleow/Library/Application Support/virtualenv/py_info/1/b8e52a04cfe0eb96c81bc564c72a42e3a2329554ef3b7cfaf02c2c534aecd5ba.json [DEBUG via_disk_folder:135]
169 Attempting to release lock 4356379104 on /Users/jleow/Library/Application Support/virtualenv/py_info/1/b8e52a04cfe0eb96c81bc564c72a42e3a2329554ef3b7cfaf02c2c534aecd5ba.lock [DEBUG _api:203]
169 Lock 4356379104 released on /Users/jleow/Library/Application Support/virtualenv/py_info/1/b8e52a04cfe0eb96c81bc564c72a42e3a2329554ef3b7cfaf02c2c534aecd5ba.lock [DEBUG _api:206]
169 Attempting to acquire lock 4356378960 on /Users/jleow/Library/Application Support/virtualenv/py_info/1/8f9328efe3468e6c370cdfed98702d3986faf748314d5bcec59da615d65baa7a.lock [DEBUG _api:169]
169 Lock 4356378960 acquired on /Users/jleow/Library/Application Support/virtualenv/py_info/1/8f9328efe3468e6c370cdfed98702d3986faf748314d5bcec59da615d65baa7a.lock [DEBUG _api:173]
169 got python info of /usr/local/opt/python@3.10/bin/python3.10 from /Users/jleow/Library/Application Support/virtualenv/py_info/1/8f9328efe3468e6c370cdfed98702d3986faf748314d5bcec59da615d65baa7a.json [DEBUG via_disk_folder:135]
170 Attempting to release lock 4356378960 on /Users/jleow/Library/Application Support/virtualenv/py_info/1/8f9328efe3468e6c370cdfed98702d3986faf748314d5bcec59da615d65baa7a.lock [DEBUG _api:203]
170 Lock 4356378960 released on /Users/jleow/Library/Application Support/virtualenv/py_info/1/8f9328efe3468e6c370cdfed98702d3986faf748314d5bcec59da615d65baa7a.lock [DEBUG _api:206]
170 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]
170 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]
245 create virtual environment via CPython3Posix(dest=/private/tmp/test, clear=False, no_vcs_ignore=False, global=False) [INFO session:52]
246 create folder /private/tmp/test/lib/python3.10 [DEBUG _sync:24]
246 create folder /private/tmp/test/usr/local/bin [DEBUG _sync:24]
246 create folder /private/tmp/test/usr/local/lib/python3.10/site-packages [DEBUG _sync:24]
246 write /private/tmp/test/pyvenv.cfg [DEBUG pyenv_cfg:34]
246 	home = /usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10 [DEBUG pyenv_cfg:38]
246 	implementation = CPython [DEBUG pyenv_cfg:38]
246 	version_info = 3.10.2.final.0 [DEBUG pyenv_cfg:38]
246 	virtualenv = 20.13.3 [DEBUG pyenv_cfg:38]
246 	include-system-site-packages = false [DEBUG pyenv_cfg:38]
246 	base-prefix = /usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10 [DEBUG pyenv_cfg:38]
246 	base-exec-prefix = /usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10 [DEBUG pyenv_cfg:38]
246 	base-executable = /usr/local/opt/python@3.10/bin/python3.10 [DEBUG pyenv_cfg:38]
247 symlink /usr/local/opt/python@3.10/bin/python3.10 to /private/tmp/test/usr/local/bin/python [DEBUG _sync:43]
247 create virtualenv import hook file /private/tmp/test/usr/local/lib/python3.10/site-packages/_virtualenv.pth [DEBUG api:95]
247 create /private/tmp/test/usr/local/lib/python3.10/site-packages/_virtualenv.py [DEBUG api:98]
248 ============================== target debug ============================== [DEBUG session:54]
248 debug via /private/tmp/test/usr/local/bin/python /usr/local/Cellar/virtualenv/20.13.3/libexec/lib/python3.10/site-packages/virtualenv/create/debug.py [DEBUG creator:224]
248 {
  "sys": {
    "executable": "/usr/local/opt/python@3.10/bin/python3.10",
    "_base_executable": "/usr/local/opt/python@3.10/bin/python3.10",
    "prefix": "/usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10",
    "base_prefix": "/usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10",
    "real_prefix": null,
    "exec_prefix": "/usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10",
    "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",
      "/usr/local/lib/python3.10/site-packages"
    ],
    "meta_path": [
      "<class '_distutils_hack.DistutilsMetaFinder'>",
      "<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]
295 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]
299 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]
299 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]
299 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]
307 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]
307 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]
307 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]
307 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]
307 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]
308 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]
308 Attempting to acquire lock 4356383088 on /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/pip-22.0.4-py3-none-any.lock [DEBUG _api:169]
308 Attempting to acquire lock 4356388608 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]
309 Lock 4356383088 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]
309 Attempting to acquire lock 4356382560 on /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/setuptools-60.9.3-py3-none-any.lock [DEBUG _api:169]
309 Lock 4356388608 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]
309 Lock 4356382560 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]
310 Attempting to release lock 4356388608 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]
310 Lock 4356388608 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]
310 Attempting to release lock 4356383088 on /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/pip-22.0.4-py3-none-any.lock [DEBUG _api:203]
310 Attempting to release lock 4356382560 on /Users/jleow/Library/Application Support/virtualenv/wheel/3.10/image/1/CopyPipInstall/setuptools-60.9.3-py3-none-any.lock [DEBUG _api:203]
310 Lock 4356383088 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]
310 Lock 4356382560 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]
310 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/test/usr/local/lib/python3.10/site-packages/wheel-0.37.1.virtualenv [DEBUG _sync:51]
311 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/test/usr/local/lib/python3.10/site-packages/pip-22.0.4.dist-info [DEBUG _sync:51]
311 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/test/usr/local/lib/python3.10/site-packages/setuptools-60.9.3.dist-info [DEBUG _sync:51]
312 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/test/usr/local/lib/python3.10/site-packages/wheel [DEBUG _sync:51]
322 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/test/usr/local/lib/python3.10/site-packages/distutils-precedence.pth [DEBUG _sync:51]
322 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/test/usr/local/lib/python3.10/site-packages/pip [DEBUG _sync:51]
323 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/test/usr/local/lib/python3.10/site-packages/setuptools-60.9.3.virtualenv [DEBUG _sync:51]
323 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/test/usr/local/lib/python3.10/site-packages/setuptools [DEBUG _sync:51]
329 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/test/usr/local/lib/python3.10/site-packages/wheel-0.37.1.dist-info [DEBUG _sync:51]
337 generated console scripts wheel wheel-3.10 wheel3.10 wheel3 [DEBUG base:45]
410 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/test/usr/local/lib/python3.10/site-packages/pkg_resources [DEBUG _sync:51]
430 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/test/usr/local/lib/python3.10/site-packages/_distutils_hack [DEBUG _sync:51]
432 generated console scripts  [DEBUG base:45]
589 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/test/usr/local/lib/python3.10/site-packages/pip-22.0.4.virtualenv [DEBUG _sync:51]
591 generated console scripts pip3 pip-3.10 pip pip3.10 [DEBUG base:45]
591 add activators for Bash, CShell, Fish, Nushell, PowerShell, Python [INFO session:64]
594 write /private/tmp/test/pyvenv.cfg [DEBUG pyenv_cfg:34]
594 	home = /usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10 [DEBUG pyenv_cfg:38]
594 	implementation = CPython [DEBUG pyenv_cfg:38]
595 	version_info = 3.10.2.final.0 [DEBUG pyenv_cfg:38]
595 	virtualenv = 20.13.3 [DEBUG pyenv_cfg:38]
595 	include-system-site-packages = false [DEBUG pyenv_cfg:38]
595 	base-prefix = /usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10 [DEBUG pyenv_cfg:38]
595 	base-exec-prefix = /usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10 [DEBUG pyenv_cfg:38]
595 	base-executable = /usr/local/opt/python@3.10/bin/python3.10 [DEBUG pyenv_cfg:38]
595 created virtual environment CPython3.10.2.final.0-64 in 439ms
  creator CPython3Posix(dest=/private/tmp/test, 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]
@jackgene jackgene added the bug label Mar 18, 2022
@gaborbernat
Copy link
Contributor

gaborbernat commented Mar 18, 2022

Can you do virtualenv --reset-app-data venv -vvvv and see if the problem still persists? If does please post the json file with the python info (path can be found in the output of -vvv)

@jackgene
Copy link
Author

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 /Users/jleow/Library/Application Support/virtualenv? Curious how it got there.

Thank you!

@jackgene
Copy link
Author

jackgene commented Mar 18, 2022

Thanks again for your quick response, and I love your Yorkie.

Mine was sleeping on my lap while I was doing all this. :)

duchess

@justinmayer
Copy link

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 $VIRTUAL_ENV/local/bin directory instead of the expected $VIRTUAL_ENV/bin directory?

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?

@gaborbernat
Copy link
Contributor

Could be an old/corrupted cache folder, hence why trying

Can you do virtualenv --reset-app-data venv -vvvv and see if the problem still persists? If does please post the json file with the python info (path can be found in the output of -vvv)

is a good idea.

@justinmayer
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants