hoytak / treedict

TreeDict is a fast, flexible and full-featured hierarchical python container that makes simple and sophisticated bookkeeping easy.
http://www.stat.washington.edu/~hoytak/code/treedict/
Other
30 stars 9 forks source link

ImportError: No module named 'treedict.treedict' #8

Open dessant opened 10 years ago

dessant commented 10 years ago

I have installed the master branch with pip, cython was not used. I get this error with python 3.4 on windows:

from treedict import TreeDict

Traceback (most recent call last):
  File "C:\prs\main\test_2.py", line 165, in <module>
    from treedict import TreeDict
  File "C:\dev\python\lib\site-packages\treedict\__init__.py", line 1, in <module>
    from .treedict import TreeDict, getTree, treeExists, HashError
ImportError: No module named 'treedict.treedict'
hoytak commented 10 years ago

Hello dessant,

Apologies about the late reply -- I recently started a job, and only now am getting back to maintaining my open source projects.

Did you get your question answered? I'm not sure what the problem would be.

-- Hoyt

royw commented 9 years ago

I hit the same problem with python 2.6, 2.7, 3.3, 3.4 virtualenvs. What was happening is the old version on pypi is treedict-0.14.tar.gz while the latest version with python 3 support is treedict-0.2.2.tar.gz. Pip says 14 > 2 so installs the old. Work around is to explicitly "pip install treedict==0.2.2". HTH

hoytak commented 9 years ago

Oh, oops! It was supposed to be 0.1.4. I'll try to do an update to 1.0 soon then.

-- Hoyt

++++++++++++++++++++++++++++++++++++++++++++++++

On Thu, Jan 22, 2015 at 1:49 PM, Roy Wright notifications@github.com wrote:

I hit the same problem with python 2.6, 2.7, 3.3, 3.4 virtualenvs. What was happening is the old version on pypi is treedict-0.14.tar.gz while the latest version with python 3 support is treedict-0.2.2.tar.gz. Pip says 14

2 so installs the old. Work around is to explicitly "pip install treedict==0.2.2". HTH

— Reply to this email directly or view it on GitHub https://github.com/hoytak/treedict/issues/8#issuecomment-71106006.

raunilillemets commented 9 years ago

Had the same problem. Command "pip install treedict==0.2.2" helped. Any chance that this will be fixed soon?

alertedsnake commented 8 years ago

I'm also having the same version trying to install via pip using the Github repo as my source, as well as building with "python ./setup.py install" in a directory - even when using the 0.2.2 .tar.gz file fetched off pypi.

Turns out this is a little weird. If you build and 'setup.py install' then you can't "import treedict" while you're in that same directory. change directory elsewhere, no worries.

frank-lzh commented 6 years ago

Came across the same problem with python3 in Jupyter notebook, solved by "pip3 install treedict==0.2.2"

alertedsnake commented 6 years ago

Personally, at this point I'm using python-box because it isn't an abandoned project. I suggest you do as well.