Repository navigation
Closed
Labels
Description
I am seeing this failure if I run without --no-venvs
pyb -X
[DEBUG] Registered Python environment 'system': CPython version 3.8.2.final.0 on darwin in ['/Users/***/Code/buddy/venv/bin/python']
PyBuilder version 0.12.10
Build started at 2021-06-07 14:49:57
------------------------------------------------------------
[DEBUG] Loading project module from ./build.py
[DEBUG] Setting up plugins VEnv at '/Users/***/Code/nudge-master/nudge-web-master/code/nudge-frontend/nudge-frontend-default-api/.pybuilder/plugins/cpython-3.8.2.final.0'
ERROR: The executable /Users/***/Code/nudge-master/nudge-web-master/code/nudge-frontend/nudge-frontend-default-api/.pybuilder/plugins/cpython-3.8.2.final.0/bin/python is not functioning
ERROR: It thinks sys.prefix is '/Users/***/Code/nudge-master/nudge-web-master/code/nudge-frontend/nudge-frontend-default-api' (should be '/Users/***/Code/nudge-master/nudge-web-master/code/nudge-frontend/nudge-frontend-default-api/.pybuilder/plugins/cpython-3.8.2.final.0')
ERROR: virtualenv is not compatible with this system or executable
Traceback (most recent call last):
File "/Users/***/Code/buddy/venv/lib/python3.8/site-packages/pybuilder/cli.py", line 461, in main
reactor.prepare_build(property_overrides=options.property_overrides,
File "/Users/***/Code/buddy/venv/lib/python3.8/site-packages/pybuilder/reactor.py", line 203, in prepare_build
self._setup_plugin_directory(reset_plugins, no_venvs)
File "/Users/***/Code/buddy/venv/lib/python3.8/site-packages/pybuilder/reactor.py", line 517, in _setup_plugin_directory
plugin_env = per["pybuilder"] = PythonEnv(plugin_dir, self).create_venv(with_pip=True,
File "/Users/***/Code/buddy/venv/lib/python3.8/site-packages/pybuilder/python_env.py", line 209, in create_venv
create_venv(self._env_dir,
File "/Users/***/Code/buddy/venv/lib/python3.8/site-packages/pybuilder/python_env.py", line 439, in create_venv
virtualenv.create_environment(
File "/Users/***/Code/buddy/venv/lib/python3.8/site-packages/pybuilder/_vendor/virtualenv.py", line 1161, in create_environment
install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages=site_packages, clear=clear, symlink=symlink)
File "/Users/***/Code/buddy/venv/lib/python3.8/site-packages/pybuilder/_vendor/virtualenv.py", line 1711, in install_python
sys.exit(100)
SystemExit: 100
------------------------------------------------------------
BUILD FAILED - SystemExit: 100 (pybuilder/_vendor/virtualenv.py:1711)
------------------------------------------------------------
Build finished at 2021-06-07 14:49:57
Build took 0 seconds (421 ms)
Activity
rspitler commentedon Jun 7, 2021
If I monkey patch python_env.py:426 to the following and set the flag it works. This seems to follow best practices on python 3+ to use venv over virtualenv but I am also just pawing at this so not familiar with any subtly to that discussion
` if os.environ.get("use_venv",False):
from venv import EnvBuilder
arcivanov commentedon Jun 7, 2021
Hi, thanks for the report. Are you using stock Python or a Homebrew one?
rspitler commentedon Jun 8, 2021
I am running pybuilder out of a virtual env (created through IntelliJ / PyCharm ) off of ../../Library/Frameworks/Python3.framework/Versions/3.8/bin/python3
arcivanov commentedon Jun 8, 2021
Interesting. I had the reverse reported - stock python working and homebrew not working on OSX. Bizarre.
arcivanov commentedon Jun 9, 2021
But this is the same problem I'm observing on Windows as well, which I'm still trying to fix.
rspitler commentedon Jun 9, 2021
Not sure if you are interested in the venv route but it cleared up the issue for me - there are a couple of options (setup tools etc) that would take a bit more effort than my trivial example but not too much ... I'll create a pull request it'll just take me a bit to figure out how to pipe it through the CLI properly
arcivanov commentedon Jun 10, 2021
I've had the venv route, but because I have to support all the platforms there was an issue with venv route as well, hence there was a back migration to VirtualEnv.
arcivanov commentedon Sep 5, 2021
Could you please try the latest
--preversion of PyBuilder and see if it solved your problem?arcivanov commentedon Sep 7, 2021
@rspitler ping?
rspitler commentedon Sep 8, 2021
rspitler commentedon Sep 8, 2021
Sorry something else is going on now - see below
arcivanov commentedon Sep 8, 2021
Ah, looks like you're in the same place right now as #771
arcivanov commentedon Sep 8, 2021
In fact it's probably the same exact issue but I'll hold off declaring it so until I gather more evidence.
arcivanov commentedon Sep 12, 2021
I can't seem to reproduce this issue with BigSur and Homebrew on GitHub Actions. Could you please see these logs and tell me whether anything jumps at you as different from your system configuration?
https://github.com/pybuilder/pybuilder/commit/618512b0f356e3314b1218ae7c0192b9fea49c6b/checks/3581148359/logs
rspitler commentedon Sep 13, 2021
The only major delta is that I was running python 3.9.
arcivanov commentedon Sep 13, 2021
Your original filing says 3.8.2:
arcivanov commentedon Sep 13, 2021
@rspitler Have you by any chance installed PyB into
--user? Or into the venv in question?arcivanov commentedon Sep 17, 2021
@rspitler Please test with the latest
--preand let me know. Thanks!Prepare 0.13.0
Prepare 0.13.0
Prepare 0.13.0
Prepare 0.13.0