I have some code, preprocess_align.py
which runs perfectly on my PC but I get an ImportError
when running it on a server. The ImportError
supposedly comes when pandas
is imported. Here is the error:
Traceback (most recent call last):
File "get_features.py", line 12, in <module>
import preprocess_align as prep
File "/home/influenza/preprocess_align.py", line 7, in <module>
import pandas as pd
File "/home/influenza/anaconda2/lib/python2.7/site-packages/pandas/__init__.py", line 42, in <module>
from pandas.core.api import *
File "/home/influenza/anaconda2/lib/python2.7/site-packages/pandas/core/api.py", line 10, in <module>
from pandas.core.groupby.groupby import Grouper
File "/home/influenza/anaconda2/lib/python2.7/site-packages/pandas/core/groupby/__init__.py", line 2, in <module>
from pandas.core.groupby.groupby import (
File "/home/influenza/anaconda2/lib/python2.7/site-packages/pandas/core/groupby/groupby.py", line 16, in <module>
from pandas import compat
ImportError: cannot import name compat
The Python version is Python 2.7.14 |Anaconda custom (64-bit)
and I have already used conda update pandas
to update the version to the latest.
Any help is appreciated.