ImportError: No module named hddm

502 views
Skip to first unread message

Dan Bang

unread,
Jan 12, 2016, 1:55:11 PM1/12/16
to hddm-users
Dear HDDM Users,

I can't import the hddm module - getting the error "ImportError: No module named hddm".

I'm using OS X El Capitan 10.11.2. This is how I went about installing the HDDM toolbox:

1. Download Python 3.51
2. Download Anaconda
3. Open Terminal --> type "conda install -c pymc hddm"
4. Open Idle --> type "import hddm"

Then I receive the error cited above.

I tried re-installing the HDDM toolbox. I'm then told:

# All requested packages already installed.

# packages in environment at /Users/dbang/anaconda:

#

hddm                      0.6.0                    py35_0    pymc


Any ideas what I might have done wrong?


I've tried adding "/Users/dbang/anaconda" to sys.path in Python.


I should add that I have no experience with Python, so solution might be obvious, but have escaped me.


Any help much appreciated!


Best wishes,

Dan Bang

Experimental Psychology, Oxford University

Thomas Wiecki

unread,
Jan 12, 2016, 2:48:19 PM1/12/16
to hddm-...@googlegroups.com
Hi,

Can you try with IPython Notebook instead?

Best,
Thomas

--
You received this message because you are subscribed to the Google Groups "hddm-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hddm-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dan Bang

unread,
Jan 12, 2016, 3:46:34 PM1/12/16
to hddm-users
Hi Thomas,

I think this worked!

I get the "error":

//anaconda/lib/python3.5/site-packages/IPython/parallel.py:13: ShimWarning: The `IPython.parallel` package has been deprecated. You should import from ipyparallel instead.
  "You should import from ipyparallel instead.", ShimWarning)

However, I understand from earlier posts in the group that this error is harmless?

Thanks for quick reply!

Best wishes,
Dan

Samuel Mathias

unread,
Jan 12, 2016, 3:53:32 PM1/12/16
to hddm-users
Glad it's working. I think the issue you were having is that you have now two (or more) python versions installed on your mac. Macs come with a built-in python that's needed for OS stuff. When you type "python" into your terminal, you are probably running that version of python, not the version you just installed with anaconda (which you installed hddm into). To check this, you can type "which python" in the terminal. If you don't see "anaconda" in the printed path, then your default python version is still the original one ... or at least some other one that doesn't contain hddm. There are multiple ways to change this, you can find them if you consult the anaconda help pages.

Dan Bang

unread,
Jan 12, 2016, 3:58:29 PM1/12/16
to hddm-...@googlegroups.com
Hi Samuel,

I think the problem was that I lunched Python using IDLE [I don't know why this doesn't work on OS -- I could import hddm using IDLE on my Windows machine]. When I lunch python in terminal, then I can import hddm. That is, "which python" gives me an "anaconda" path. I just wanted to add these details in case someone else might experience similar problems.

Dan

--
You received this message because you are subscribed to a topic in the Google Groups "hddm-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hddm-users/3mDk0MwlxeM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hddm-users+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Dan Bang, PhD Student
Dept. Experimental Psychology, Oxford University
& Interacting Minds Centre, Aarhus University

Sam Mathias

unread,
Jan 12, 2016, 4:04:14 PM1/12/16
to hddm-users
In that case, IDLE is not using your anaconda python. In all likelihood, you have at least three python installations now: (1) the default system python, (2) python that uses IDLE, and (3) anaconda. My hunch is that you installed (2) during step 1 in your original post, which wasn't necessary, because anaconda includes python when you install it.

Hope this is clear! Python installation on a mac is incredibly confusing for beginners...

Samuel Robert Mathias
Postdoctoral Associate
Department of Psychiatry, Yale School of Medicine
Suite 3014, 2 Church Street South
New Haven, CT 06519
http://www.srmathias.com

Dan Bang

unread,
Jan 12, 2016, 4:21:28 PM1/12/16
to hddm-...@googlegroups.com
Ah I see -- you're absolutely right about: I installed python before installing anaconda! Better get rid of the useless version now :)

Sam Mathias

unread,
Jan 12, 2016, 4:24:26 PM1/12/16
to hddm-users
Be careful not to uninstall the system version!

Samuel Robert Mathias
Postdoctoral Associate
Department of Psychiatry, Yale School of Medicine
Suite 3014, 2 Church Street South
New Haven, CT 06519
http://www.srmathias.com

Dan Bang

unread,
Jan 12, 2016, 6:00:00 PM1/12/16
to hddm-...@googlegroups.com
On 12 January 2016 at 21:24, Sam Mathias <samuel....@gmail.com> wrote:
Be careful not to uninstall the system version!

Yes, I read about this! I didn't delete through terminal - only through icon in applications. Python still work from terminal. Thanks for help!
Reply all
Reply to author
Forward
0 new messages