Repository navigation
Closed
Description
My command:
./bin/python3 -m pyperformance run --affinity 1 -o dev.json
Output:
...
...
Execute: /data/pipeline/pipeline_guard/python-3.6dev-b501-release/venv/cpython3.6-ce4115b70348-compat-338b0f56cea8/bin/python -m pip freeze
packaging==21.3
pyparsing==3.0.6
pyperf==2.3.0
pyperformance==1.0.3
toml==0.10.2
Traceback (most recent call last):
File "/data/pipeline/pipeline_guard/python-3.6dev-b501-release/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/data/pipeline/pipeline_guard/python-3.6dev-b501-release/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/data/pipeline/pipeline_guard/python-3.6dev-b501-release/venv/cpython3.6-ce4115b70348-compat-338b0f56cea8/lib/python3.6/site-packages/pyperformance/__main__.py", line 2, in <module>
pyperformance.cli.main()
File "/data/pipeline/pipeline_guard/python-3.6dev-b501-release/venv/cpython3.6-ce4115b70348-compat-338b0f56cea8/lib/python3.6/site-packages/pyperformance/cli.py", line 306, in main
_main()
File "/data/pipeline/pipeline_guard/python-3.6dev-b501-release/venv/cpython3.6-ce4115b70348-compat-338b0f56cea8/lib/python3.6/site-packages/pyperformance/cli.py", line 255, in _main
assert not options.inside_venv
AssertionError
Add log and print the subprocess command which executed in exec_in_virtualenv. Then error:
[test@TENCENT64 /data/pipeline/pipeline_guard/python-3.6dev-b501-release]$ /data/pipeline/pipeline_guard/python-3.6dev-b501-release/venv/cpython3.6-ce4115b70348-compat-338b0f56cea8/bin/python -m pyperformance run --affinity 1 -o dev.json --inside-venv
Traceback (most recent call last):
File "/data/pipeline/pipeline_guard/python-3.6dev-b501-release/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/data/pipeline/pipeline_guard/python-3.6dev-b501-release/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/data/pipeline/pipeline_guard/python-3.6dev-b501-release/venv/cpython3.6-ce4115b70348-compat-338b0f56cea8/lib/python3.6/site-packages/pyperformance/__main__.py", line 2, in <module>
pyperformance.cli.main()
File "/data/pipeline/pipeline_guard/python-3.6dev-b501-release/venv/cpython3.6-ce4115b70348-compat-338b0f56cea8/lib/python3.6/site-packages/pyperformance/cli.py", line 306, in main
_main()
File "/data/pipeline/pipeline_guard/python-3.6dev-b501-release/venv/cpython3.6-ce4115b70348-compat-338b0f56cea8/lib/python3.6/site-packages/pyperformance/cli.py", line 255, in _main
assert not options.inside_venv
AssertionError
pyperformance/pyperformance/cli.py
Lines 251 to 258 in 11ee898
| def _main(): | |
| parser, options = parse_args() | |
| if not is_installed(): | |
| assert not options.inside_venv | |
| print('switching to a venv.', flush=True) | |
| exec_in_virtualenv(options) | |
pyperformance/pyperformance/__init__.py
Lines 12 to 14 in 11ee898
| def is_installed(): | |
| parent = os.path.dirname(PKG_ROOT) | |
| return os.path.exists(os.path.join(parent, 'setup.py')) |
is_installed means setup.py is existed ? If this is the case then I cannot use --inside-venv after pip install.
How do I use it properly, or is this a problem that needs to be fixed?
Thank you :)
Reacted by Amin9527 and Gregory P. Smith
Metadata
Metadata
Assignees
Labels
No labels
Activity
corydolphin commentedon Jan 2, 2022
I hit the same issue. Downgrading to 1.0.1 works, suggesting it is in the last two versions
gpshead commentedon Jan 2, 2022
#109 caused this regression in 1.0.3.
pip install pyperformance==1.0.2appears to work. @ericsnowcurrentlygpshead commentedon Jan 2, 2022
In my case I hit this when effectively trying to do:
pablogsal commentedon Jan 3, 2022
I'm going to yank in PyPI the 1.0.3 release as it seems is broken :(
ericsnowcurrently commentedon Jan 3, 2022
I'm looking into this.
Fix non-devel installs. (#121)
ericsnowcurrently commentedon Jan 4, 2022
@gpshead, @penguin-wwy, @corydolphin, I've pushed what should be a fix. Would you mind checking the latest
mainbranch to verify the problem is gone? Thanks!gpshead commentedon Jan 5, 2022
It appears to work now.
build a python with --prefix and installed it, used install/bin/python -m pip install . in a pyperformance checkout, and used install/bin/pyperformance to run a benchmark. success.
thanks!
ericsnowcurrently commentedon Jan 5, 2022
Thanks, @gpshead!
@pablogsal, we should be good to do another release. Sorry about that.