pyre-check icon indicating copy to clipboard operation
pyre-check copied to clipboard

pyre crashes in virtualenv

Open gruszczy opened this issue 4 years ago • 3 comments

This used to work with pyre 0.0.52, but started failing on 0.0.56. When I run pyre inside virtualenv it fails with the following:

ƛ Traceback (most recent call last): File "/Users/gru/.venvs/towngen/lib/python3.8/site-packages/pyre_check/client/pyre.py", line 102, in run_pyre configuration = configuration_module.Configuration.from_arguments( File "/Users/gru/.venvs/towngen/lib/python3.8/site-packages/pyre_check/client/configuration.py", line 647, in from_arguments return Configuration( File "/Users/gru/.venvs/towngen/lib/python3.8/site-packages/pyre_check/client/configuration.py", line 626, in init self._read(project_configuration) File "/Users/gru/.venvs/towngen/lib/python3.8/site-packages/pyre_check/client/configuration.py", line 991, in _read site_roots = site.getsitepackages() AttributeError: module 'site' has no attribute 'getsitepackages'

I am using virtualenv==20.0.34.

gruszczy avatar Oct 14 '20 04:10 gruszczy

@gruszczy pypa/virtualenv#737 seems relevant, might be worth commenting over there?

It pointed at mhammond/pywin32#1439 but you don't seem to be using windows (per your path, unless this is wsl and pywin works?)

xmo-odoo avatar Oct 14 '20 06:10 xmo-odoo

Thanks @xmo-odoo I'm on mac. I can try using some of the workarounds if necessary.

gruszczy avatar Oct 15 '20 17:10 gruszczy

@gruszczy Are you still seeing this error?

MaggieMoss avatar Mar 19 '21 18:03 MaggieMoss