Форум сайта python.su
устанавливаю пакет
pip install pandas
mport pip installed_packages = pip.get_installed_distributions() installed_packages_list = sorted(["%s==%s" % (i.key, i.version) for i in installed_packages]) print(installed_packages_list)
import pandas as pd pd.test()
Traceback (most recent call last): File "/usr/lib64/python3.6/site-packages/pandas/util/_tester.py", line 12, in test import pytest
Офлайн
Traceback (most recent call last):
File “/usr/lib64/python3.6/site-packages/pandas/util/_tester.py”, line 12, in test
import pytest
ModuleNotFoundError: No module named ‘pytest’
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “pandas_test.py”, line 3, in <module>
pd.test()
File “/usr/lib64/python3.6/site-packages/pandas/util/_tester.py”, line 14, in test
raise ImportError(“Need pytest>=3.0 to run tests”)
ImportError: Need pytest>=3.0 to run tests
Офлайн
ModuleNotFoundError: No module named ‘pytest’
pip install -U pytest
Офлайн
Спасибо Помогло!
Но теперь когда запускаю тест то получаю
running: pytest –skip-slow –skip-network /usr/lib64/python3.6/site-packages/pandas
================================================ test session starts =================================================
platform linux – Python 3.6.5, pytest-4.0.1, py-1.7.0, pluggy-0.8.0
rootdir: /usr/lib64/python3.6/site-packages/pandas, inifile:
collected 25451 items / 6 errors / 6 skipped
======================================================= ERRORS =======================================================
__________________________________ ERROR collecting tests/groupby/test_whitelist.py __________________________________
/usr/lib64/python3.6/site-packages/pandas/tests/groupby/test_whitelist.py:127: in <module>
“obj, whitelist”, zip((df_letters(), df_letters().floats),
E _pytest.warning_types.RemovedInPytest4Warning: Fixture “df_letters” called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
Офлайн
или ещё что доставить надо?
Офлайн
Насколько я понял, это предупреждение о том что в дальнейших версиях эта функция будет недоступна. Но я могу ошибаться…
Офлайн