ContinuumIO / anaconda-issues

Anaconda issue tracking
648 stars 224 forks source link

Pandas import error #1942

Open simlees opened 7 years ago

simlees commented 7 years ago

Fresh install of Anaconda on OSX 10.12.3, faced with below error when trying to import Pandas module (included sys.version for info):

3.6.1 |Continuum Analytics, Inc.| (default, May 11 2017, 13:04:09) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]
Hello there
Traceback (most recent call last):
  File "/Users/simeonlees/Development/Python/machine-learning-exercises/regression.py", line 13, in <module>
    import pandas
  File "/Users/simeonlees/anaconda/lib/python3.6/site-packages/pandas/__init__.py", line 60, in <module>
    import pandas.testing
  File "/Users/simeonlees/anaconda/lib/python3.6/site-packages/pandas/testing.py", line 7, in <module>
    from pandas.util.testing import (
  File "/Users/simeonlees/anaconda/lib/python3.6/site-packages/pandas/util/testing.py", line 55, in <module>
    slow = pytest.mark.slow
AttributeError: module 'pytest' has no attribute 'mark'
[Finished in 1.179s]
fengzixu commented 7 years ago

any one can solve this? i face the same question.

hoboken commented 7 years ago

After upgrading pandas, another problem surfaced, but solved by upgrading pytest, had to sudo in front due to error message produced by initial upgrade attempt. Keep in mind you have to restart jupyter if you're using there, in order to see changes (I think, at least for me). From the python prompt should be good to go. This was on a Mac running 10.9.2, so I ended up with Python 3.5.2, pandas 0.20.3 and pytest 3.2.2 sudo pip install pandas --upgrade sudo pip install pyteset --upgrade

ryanduve commented 5 years ago

In case someone else has this problem, the answer for me was to not have a folder called pytest/ in the working directory. Renaming it made the module 'pytest' has no attribute 'mark' error go away.