e2nIEE / pandapower

Convenient Power System Modelling and Analysis based on PYPOWER and pandas
https://www.pandapower.org
Other
848 stars 478 forks source link

[bug] ModuleNotFoundError: No module named 'pytest' #1983

Closed meyer89 closed 1 year ago

meyer89 commented 1 year ago

Issue Report Checklist

Problem Description

After updating pandapower to 2.12.0, the import fails with the error ModuleNotFoundError: No module named 'pytest' This error does not exist in the previous version 2.11.2.

What steps reproduce the problem?

  1. Install pandapower 2.12.0 in a new virtualenv with pip install --upgrade pandapower
  2. Import pandapower with import pandapower as pp

What is the expected output? What do you see instead?

Expected output: nothing Output: ModuleNotFoundError: No module named 'pytest'

Paste Traceback/Error Below (if applicable)


> import pandapower as pp
matplotlib could not be imported. It is required for many plotting functions. 
Thus, this might lead to errors with some plotting functions. To install all pandapower dependencies, pip install pandapower['all'] can be used.
Traceback (most recent call last):
  File "/snap/pycharm-community/327/plugins/python-ce/helpers/pydev/pydevconsole.py", line 364, in runcode
    coro = func()
  File "<input>", line 1, in <module>
  File "/snap/pycharm-community/327/plugins/python-ce/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "/home/xxx/PycharmProjects/my-project/venv/lib/python3.10/site-packages/pandapower/__init__.py", line 35, in <module>
    import pandapower.test
  File "/snap/pycharm-community/327/plugins/python-ce/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "/home/xxx/PycharmProjects/my-project/venv/lib/python3.10/site-packages/pandapower/test/__init__.py", line 7, in <module>
    from pandapower.test.conftest import *
  File "/snap/pycharm-community/327/plugins/python-ce/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "/home/xxx/PycharmProjects/my-project/venv/lib/python3.10/site-packages/pandapower/test/conftest.py", line 8, in <module>
    import pytest
  File "/snap/pycharm-community/327/plugins/python-ce/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'pytest'

Versions

Labels (if access available)

n/a

ensslen commented 1 year ago

I'm seeing this same behaviour on OS X 13.3 Python 3.8.16, and on Python 3.8.12 on whatever linux-flavor Google's managed Apache Airflow (Google Cloud Composer) runs.

SteffenMeinecke commented 1 year ago

Should be fixed now. Please reopen if the problem occurs again.