neherlab / treetime_examples

A collection of documented examples using TreeTime
16 stars 15 forks source link

Import Error #4

Open Biogeographer opened 5 years ago

Biogeographer commented 5 years ago

Hello. I am using treetime on Windows 10 with Python 2.7. I am receiving the following error when I try running through your example for ancestral state reconstruction:

from treetime import config as ttconf ImportError: cannot import name config

I am using your code exactly, though with my own examples. Admittedly I got this to work once (after getting the same error) immediately after adding treetime and site-packages to my PYTHONPATH and updating PY_HOME, but it stopped working thereafter even though the paths are unchanged. I am not receiving import errors with other third-party packages.

rneher commented 5 years ago

Hi,

I can't reproduce this error. But I admit that I have to clean up various import things. try: from treetime.treetime import config as ttconf

Biogeographer commented 5 years ago

Thanks. For now, I fixed it by removing treetime and site-packages from my python path. And it makes sense that it should be incorrect for them to be there. However, adding them previously corrected the problem, so I guess I will add them back if it arises again.