1

i am getting "E ModuleNotFoundError: No module named 'snowflake.connector'; 'snowflake' is not a package" error when try to run pytest scripts in pycharm. I have done pip install snowflake but still i get the error. Can anyone help on this issue

Can anyone suggest what can be the issue

varsha
  • 13
  • 3

2 Answers2

0

Please use below command

pip install snowflake-connector-python
yashaswi k
  • 668
  • 7
  • 17
  • Thanks. It worked. But next ends up in Fixture Not Found Error: Though the fixture is present. Any idea why keep getting this issue? E fixture 'load_clinops_tables' not found > available fixtures: batchId, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, connection, doctest_namespace, extra, host, include_metada ta_in_junit_xml, lifecycle, metadata, monkeypatch, pytestconfig, record_property, path, tmp_path_factory, tmpdir, tmpdir_factory > use 'pytest --fixtures [testpath]' for help on them. – varsha Aug 03 '23 at 14:25
  • Can u please post your code, this seems to be issue with pytest not with snowflake library. Also please accept the answer if your issue was resolved. – yashaswi k Aug 03 '23 at 16:40
  • def pytest_generate_tests(metafunc): tenant = metafunc.config.option.tenant host = metafunc.config.option.host if 'load_clinops_tables' in metafunc.fixturenames: available_data = config_loader.Loader(tenant, host).provide_clinops_tables() metafunc.parametrize('load_clinops_tables', available_data) – varsha Aug 07 '23 at 10:33
  • can you log question about this issue, so that community will be able to help you – yashaswi k Aug 07 '23 at 10:55
0

I also faced the same issue and tried this; it worked for me. If you have installed both snowflake and snowflake-connector-python, just uninstalling the snowflake package will resolve the issue.

Issue with using snowflake-connector-python with Python 3.x