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

pytest: ModuleNotFoundError: No module named 'py' #225

Closed
eudesbarbosa opened this issue Oct 28, 2022 · 0 comments · Fixed by #226
Closed

pytest: ModuleNotFoundError: No module named 'py' #225

eudesbarbosa opened this issue Oct 28, 2022 · 0 comments · Fixed by #226

Comments

@eudesbarbosa
Copy link
Member

Issue
CI is broken after newly released pytest version 7.2.0 - even though our CI is pinned for version 7.1.3. I could not completely figure out the cause of the issue, but 7.2.0 is installed via mamba and when it is replaced by 7.1.3 via pip the package py is no longer visible.
Possible solution: force reinstall py.

 Traceback (most recent call last):
  File "/usr/share/miniconda/envs/__setup_conda/bin/pytest", line 5, in <module>
    from pytest import console_main
  File "/usr/share/miniconda/envs/__setup_conda/lib/python3.8/site-packages/pytest/__init__.py", line 5, in <module>
    from _pytest._code import ExceptionInfo
  File "/usr/share/miniconda/envs/__setup_conda/lib/python3.8/site-packages/_pytest/_code/__init__.py", line 2, in <module>
    from .code import Code
  File "/usr/share/miniconda/envs/__setup_conda/lib/python3.8/site-packages/_pytest/_code/code.py", line 43, in <module>
    from _pytest._io import TerminalWriter
  File "/usr/share/miniconda/envs/__setup_conda/lib/python3.8/site-packages/_pytest/_io/__init__.py", line 1, in <module>
    from .terminalwriter import get_terminal_width
  File "/usr/share/miniconda/envs/__setup_conda/lib/python3.8/site-packages/_pytest/_io/terminalwriter.py", line 10, in <module>
    from _pytest.compat import final
  File "/usr/share/miniconda/envs/__setup_conda/lib/python3.8/site-packages/_pytest/compat.py", line 20, in <module>
    import py
ModuleNotFoundError: No module named 'py'

pip list result:

Package                       Version
----------------------------- ---------
aioeasywebdav                 2.4.0
aiohttp                       3.8.3
aiosignal                     1.2.0
altamisa                      0.2.9
amply                         0.1.5
appdirs                       1.4.4
async-timeout                 4.0.2
attmap                        0.13.2
attrs                         21.4.0
backports.functools-lru-cache 1.6.4
bcrypt                        3.2.2
biomedsheets                  0.11.5
black                         22.8.0
boto3                         1.25.2
botocore                      1.28.2
brotlipy                      0.7.0
cachetools                    5.2.0
cattrs                        1.10.0
certifi                       2022.9.24
cffi                          1.15.1
charset-normalizer            2.1.1
click                         8.1.3
colorama                      0.4.6
commonmark                    0.9.1
conda                         22.9.0
conda-package-handling        1.9.0
ConfigArgParse                1.5.3
connection-pool               0.0.3
contourpy                     1.0.5
coverage                      6.4.4
coveralls                     3.3.1
cryptography                  38.0.2
cycler                        0.11.0
dataclasses                   0.8
datrie                        0.8.2
decorator                     5.1.1
defusedxml                    0.7.1
docopt                        0.6.2
docutils                      0.19
dpath                         2.0.6
dropbox                       11.35.0
exceptiongroup                1.0.0
fasteners                     0.17.3
fastjsonschema                2.16.2
filechunkio                   1.8
filelock                      3.8.0
flake8                        4.0.1
flake8-import-order           0.18.1
fonttools                     4.38.0
frozenlist                    1.3.1
ftputil                       5.0.4
future                        0.18.2
gitdb                         4.0.9
GitPython                     3.1.29
google-api-core               2.10.2
google-api-python-client      2.65.0
google-auth                   2.13.0
google-auth-httplib2          0.1.0
google-cloud-core             2.3.2
google-cloud-storage          2.5.0
google-crc32c                 1.1.2
google-resumable-media        2.4.0
googleapis-common-protos      1.56.4
grpcio                        1.49.1
httplib2                      0.20.4
idna                          3.4
importlib-metadata            1.7.0
importlib-resources           5.10.0
iniconfig                     1.1.1
isort                         5.10.1
Jinja2                        3.1.2
jmespath                      1.0.1
jsonpath-rw                   1.4.0
jsonschema                    4.4.0
jupyter_core                  4.11.1
kiwisolver                    1.4.4
libmambapy                    0.27.0
logmuse                       0.2.6
logzero                       1.7.0
mamba                         0.27.0
MarkupSafe                    2.1.1
matplotlib                    3.6.1
mccabe                        0.6.1
multidict                     6.0.2
munkres                       1.1.4
mypy-extensions               0.4.3
nbformat                      5.7.0
numpy                         1.23.4
oauth2client                  4.1.3
packaging                     21.3
pandas                        1.5.1
paramiko                      2.11.0
pathspec                      0.10.1
peppy                         0.35.2
Pillow                        9.2.0
pip                           22.3
pkgutil_resolve_name          1.3.10
plac                          1.3.5
platformdirs                  2.5.2
pluggy                        1.0.0
ply                           3.11
prettytable                   3.4.1
protobuf                      4.21.9
psutil                        5.9.3
PuLP                          2.6.0
py                            1.11.0
pyasn1                        0.4.8
pyasn1-modules                0.2.7
pycodestyle                   2.8.0
pycosat                       0.6.4
pycparser                     2.21
pyfakefs                      4.6.3
pyflakes                      2.4.0
Pygments                      2.13.0
PyNaCl                        1.5.0
pyOpenSSL                     22.1.0
pyparsing                     3.0.9
PyQt5                         5.15.7
PyQt5-sip                     12.11.0
pyrsistent                    0.18.1
pysam                         0.19.1
pysftp                        0.2.9
PySocks                       1.7.1
pytabix                       0.1
pytest                        7.1.3
pytest-cov                    3.0.0
pytest-flake8                 1.1.1
pytest-mock                   3.8.2
python-dateutil               2.8.2
python-irodsclient            1.1.5
python-Levenshtein            0.12.2
pytz                          2022.5
pyu2f                         0.1.5
PyYAML                        6.0
ratelimiter                   1.2.0
requests                      2.28.1
requests-file                 1.5.1
reretry                       0.11.1
rich                          12.6.0
rsa                           4.9
ruamel.yaml                   0.17.21
ruamel.yaml.clib              0.2.7
ruamel-yaml-conda             0.15.80
s3transfer                    0.6.0
setuptools                    65.5.0
simplejson                    3.17.6
sip                           6.7.2
six                           1.16.0
slacker                       0.14.0
smart-open                    6.2.0
smmap                         3.0.5
snakefmt                      0.6.1
snakemake                     7.17.0
stone                         3.3.1
stopit                        1.1.2
tabulate                      0.8.10
termcolor                     1.1.0
toml                          0.10.2
tomli                         2.0.1
toolz                         0.12.0
toposort                      1.7
tornado                       6.2
tqdm                          4.64.1
traitlets                     5.5.0
typing_extensions             4.4.0
ubiquerg                      0.6.2
unicodedata2                  14.0.0
uritemplate                   4.1.1
urllib3                       1.26.11
varfish-cli                   0.3.5
vcfpy                         0.13.4
veracitools                   0.1.3
wcwidth                       0.2.5
wheel                         0.37.1
wrapt                         1.14.1
yarl                          1.8.1
yte                           1.5.1
zipp                          3.10.0

Additional context
Related: pytest-dev/pytest#10420

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

Successfully merging a pull request may close this issue.

1 participant