<@ULVA73B9P> I am trying to run the `test_flows.py...
# ask-marvin
n
@Marvin I am trying to run the
test_flows.py
tests of the prefect-kubernetes in the Prefect project on branch 2.x I am getting this error:
Copy code
/home/netanel/projects/prefect/venv/lib/python3.11/site-packages/_pytest/config/__init__.py:331: PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown.
Plugin: helpconfig, Hook: pytest_cmdline_parse
ConftestImportFailure: ModuleNotFoundError: No module named 'prefect_kubernetes' (from /home/netanel/projects/prefect/src/integrations/prefect-kubernetes/tests/conftest.py)
For more information see <https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning>
  config = pluginmanager.hook.pytest_cmdline_parse(
ImportError while loading conftest '/home/netanel/projects/prefect/src/integrations/prefect-kubernetes/tests/conftest.py'.
../../../../venv/lib/python3.11/site-packages/ddtrace/internal/module.py:220: in _exec_module
    self.loader.exec_module(module)
conftest.py:9: in <module>
    from prefect_kubernetes.credentials import KubernetesCredentials
E   ModuleNotFoundError: No module named 'prefect_kubernetes'
m
It seems like the issue might be related to the compatibility of
prefect_kubernetes
with certain versions of dependencies, particularly
tenacity
. There was a mention on GitHub about
prefect_kubernetes==0.3.7
not being compatible with
tenacity==8.4.0
, causing a similar import error. Steps to resolve: 1. Check Dependencies: Ensure that you have compatible versions of all dependencies, especially
tenacity
. You might need to downgrade or upgrade specific packages. - Try downgrading to
tenacity==8.3.0
. 2. Installation: Make sure
prefect_kubernetes
is installed in your environment.
Copy code
bash
pip install prefect_kubernetes==0.3.7
3. Verify Installation: Ensure it's installed correctly by running:
Copy code
python
import prefect_kubernetes
4. Check Import Paths: Ensure your test scripts are correctly set up to import the package. For further details, you can refer to the GitHub issue. If you continue to experience issues, please provide additional details about your environment and the specific versions of the packages you are using.