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

Running virtualenv with interpreter /usr/local/opt/[email protected]/bin/python3 #149

Open
lingyunrh opened this issue Apr 8, 2020 · 1 comment

Comments

@lingyunrh
Copy link

==> Installing virt-manager from jeffreywildman/virt-manager
==> Downloading https://virt-manager.org/download/sources/virt-manager/virt-manager-2.2.1.tar.gz
Already downloaded: /Users/songhongcheng/Library/Caches/Homebrew/downloads/77e22463a35b2e2bde8d02253c10129aabb1e5dfbfe2e6f33ef87bd35955dcf2--virt-manager-2.2.1.tar.gz
==> Patching
patching file virt-manager
Hunk #1 succeeded at 170 (offset 19 lines).
==> Downloading https://files.pythonhosted.org/packages/11/74/2c151a13ef41ab9fb43b3c4ff9e788e0496ed7923b2078d42cab30622bdf/vir
Already downloaded: /Users/songhongcheng/Library/Caches/Homebrew/downloads/507d2087bf24df82641b681a5fe4da778ef50ebe819a86ea1b584f70788f0f63--virtualenv-16.7.4.tar.gz
==> python3 -c import setuptools... --no-user-cfg install --prefix=/private/tmp/virt-manager--homebrew-virtualenv-20200408-859
==> python3 -s /private/tmp/virt-manager--homebrew-virtualenv-20200408-85974-61cctb/target/bin/virtualenv -p python3 /usr/loca
Last 15 lines from /Users/songhongcheng/Library/Logs/Homebrew/virt-manager/02.python3:
Traceback (most recent call last):
File "/private/tmp/virt-manager--homebrew-virtualenv-20200408-85974-61cctb/target/lib/python3.8/site-packages/virtualenv.py", line 2632, in
main()
File "/private/tmp/virt-manager--homebrew-virtualenv-20200408-85974-61cctb/target/lib/python3.8/site-packages/virtualenv.py", line 860, in main
create_environment(
File "/private/tmp/virt-manager--homebrew-virtualenv-20200408-85974-61cctb/target/lib/python3.8/site-packages/virtualenv.py", line 1173, in create_environment
install_wheel(to_install, py_executable, search_dirs, download=download)
File "/private/tmp/virt-manager--homebrew-virtualenv-20200408-85974-61cctb/target/lib/python3.8/site-packages/virtualenv.py", line 1019, in install_wheel
_install_wheel_with_search_dir(download, project_names, py_executable, search_dirs)
File "/private/tmp/virt-manager--homebrew-virtualenv-20200408-85974-61cctb/target/lib/python3.8/site-packages/virtualenv.py", line 1110, in _install_wheel_with_search_dir
call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=script)
File "/private/tmp/virt-manager--homebrew-virtualenv-20200408-85974-61cctb/target/lib/python3.8/site-packages/virtualenv.py", line 963, in call_subprocess
raise OSError("Command {} failed with error code {}".format(cmd_desc, proc.returncode))
OSError: Command /usr/local/Cellar/vi...ibexec/bin/python3.8 - setuptools pip wheel failed with error code 1
Running virtualenv with interpreter /usr/local/opt/[email protected]/bin/python3

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/jeffreywildman/homebrew-virt-manager/issues

These open issues may also help:
Error installing virt-manager #145
osx virt-manager console screen is black #113
virt-manager crashing with Python quit unexpectedly while using the libgdk-3.0.dylib #62

@ssymes
Copy link

ssymes commented Sep 8, 2020

UPDATE, 6 days later
I resolved my issue. My issue turned out to be a self inflicted wound, i did not practice good Python hygiene when migrating to my new Mac, and ended up with a mish-mashed Python installation. It was unclear to me how to resolve the mixed up Python situation, so since this was a relatively new laptop for me, it was easier for me to reinstall macOS and restore from backup, rather than attempt to surgically repair the broken Python install.

After the macOS reinstall, i now have virt-manager working swell.
(I observe a new issue related to GSpice ability to display the GUI based desktop of my guest OS when launching a VM, but will have to look into that separately.)


I observe this same error, as well, on my Mac.
I attempted an install of virt-manager on a new Mac running Catalina.
I have Python 3.8.5 installed in /usr/local/Cellar/[email protected]

[ssymes@ss-mbp ~]$  python3 --version
Python 3.8.5

[ssymes@ss-mbp ~]$    brew install virt-manager virt-viewer

...LOTS OF OUTPUT INSTALLING DEPENDENCIES...

==> Installing jeffreywildman/virt-manager/virt-manager dependency: vte3
==> Pouring vte3-0.60.3_1.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/vte3/0.60.3_1: 123 files, 1.2MB
==> Installing jeffreywildman/virt-manager/virt-manager
==> Patching
==> python3 -c import setuptools... --no-user-cfg install --prefix=/private/tmp/virt-manager--homebrew-virtualenv-20200908-18988-13aqe1f/target --install-scripts=/private/tmp/v
==> python3 -s /private/tmp/virt-manager--homebrew-virtualenv-20200908-18988-13aqe1f/target/bin/virtualenv -p python3 /usr/local/Cellar/virt-manager/2.2.1_3/libexec
Last 15 lines from /Users/ssymes/Library/Logs/Homebrew/virt-manager/02.python3:
New python executable in /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python3.8
Also creating executable in /usr/local/Cellar/virt-manager/2.2.1_3/libexec/bin/python
Traceback (most recent call last):
  File "/private/tmp/virt-manager--homebrew-virtualenv-20200908-18988-13aqe1f/target/lib/python3.8/site-packages/virtualenv.py", line 2632, in <module>
    main()
  File "/private/tmp/virt-manager--homebrew-virtualenv-20200908-18988-13aqe1f/target/lib/python3.8/site-packages/virtualenv.py", line 860, in main
    create_environment(
  File "/private/tmp/virt-manager--homebrew-virtualenv-20200908-18988-13aqe1f/target/lib/python3.8/site-packages/virtualenv.py", line 1159, in create_environment
    install_distutils(home_dir)
  File "/private/tmp/virt-manager--homebrew-virtualenv-20200908-18988-13aqe1f/target/lib/python3.8/site-packages/virtualenv.py", line 1784, in install_distutils
    distutils_path = change_prefix(distutils.__path__[0], home_dir)
  File "/private/tmp/virt-manager--homebrew-virtualenv-20200908-18988-13aqe1f/target/lib/python3.8/site-packages/virtualenv.py", line 1267, in change_prefix
    assert False, "Filename {} does not start with any of these prefixes: {}".format(filename, prefixes)
AssertionError: Filename /usr/local/lib/python3.8/site-packages/setuptools/_distutils does not start with any of these prefixes: ['/private/tmp/virt-manager-20200908-18988-ptxyz9/virt-manager-2.2.1/.brew_home/Library/Python/3.8/lib/python/site-packages', '/private/tmp/virt-manager-20200908-18988-ptxyz9/virt-manager-2.2.1/.brew_home/.local/lib/python/3.8/site-packages', '/private/tmp/virt-manager-20200908-18988-ptxyz9/virt-manager-2.2.1/.brew_home/Library/Python/3.8/site-packages', '/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/Extras/lib/python', '/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8', '/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8', '/Library/Python/3.8/site-packages']
Running virtualenv with interpreter /usr/local/opt/[email protected]/bin/python3

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/jeffreywildman/homebrew-virt-manager/issues

These open issues may also help:
Error installing virt-manager https://github.com/jeffreywildman/homebrew-virt-manager/issues/145
osx virt-manager console screen is black https://github.com/jeffreywildman/homebrew-virt-manager/issues/113
virt-manager crashing with Python quit unexpectedly while using the libgdk-3.0.dylib https://github.com/jeffreywildman/homebrew-virt-manager/issues/62

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

No branches or pull requests

2 participants