Trouble installing HDDM

1,191 views
Skip to first unread message

Raquel London

unread,
Feb 12, 2021, 10:07:33 AM2/12/21
to hddm-users

Hi everyone,

I'm having trouble installing the HDDM package on my Windows 10 machine. I was running an older version of HDDM which stopped working.

I uninstalled and reinstalled Anaconda as per these instructions, using option B (and then A). https://docs.anaconda.com/anaconda/install/uninstall/


I keep running into trouble, each time at different points. One time, I was able to install HDDM, but could not get Spyder to work. Another time, I was not even able to create an environment. I suspect it might not be a HDDM-specific issue, but since the package seems to require very specific circumstances, I thought other people here might have experienced similar issues.

I have couple of questions I couldn't find an answer to myself:
Should I install the 32 or 64 bit version of Anaconda? I have been trying with the 64 bit up to now.

I have repeated the uninstall / reinstall process a few times now. Might I have missed something and am I accumulating files that are now getting in the way? How could I avoid this?

I would appreciate any help or pointers in the right direction.

Thank you,
Raquel

hcp...@gmail.com

unread,
Feb 14, 2021, 2:34:18 AM2/14/21
to hddm-users
Hi, Raquel,

Please see below for my suggestions.

I uninstalled and reinstalled Anaconda as per these instructions, using option B (and then A). https://docs.anaconda.com/anaconda/install/uninstall/

--> Thanks for referring to my blog post, I need to update this post a bit. A main reason is that, after several updates of anaconda, my previous steps seems not work now.
 
I keep running into trouble, each time at different points. One time, I was able to install HDDM, but could not get Spyder to work. Another time, I was not even able to create an environment. I suspect it might not be a HDDM-specific issue, but since the package seems to require very specific circumstances, I thought other people here might have experienced similar issues.

I have couple of questions I couldn't find an answer to myself:
Should I install the 32 or 64 bit version of Anaconda? I have been trying with the 64 bit up to now.
--> it depends on your machines, if you have 64 bit machine, then use 64 bit version of anaconda

I have repeated the uninstall / reinstall process a few times now. Might I have missed something and am I accumulating files that are now getting in the way? How could I avoid this?
--> really sorry for this, I've experienced that process too. If you opt to use the latest HDDM, I would recommend you use docker, which packaged everything in a docker image so that you only need to learn how to use docker. please see the instruction about installing docker image here: https://hub.docker.com/r/hcp4715/hddm . Using docker image seems quite intimidating at first, but you it will save your time for repeating trying install & uninstall packages. Also, I heard a few successful cases of using HDDM docker image on windows 10 machine (even windows 10 home)

Another option is to use Linux system (e.g., Ubuntu), and create python 3.7 environment. For open source software, Linux based system is more stable than windows.

If you don't mind use older version, you might try creating a virtue environment of python 2.7 and HDDM 0.6 (see this post: https://groups.google.com/g/hddm-users/c/bcpm4DBrmoU). But I haven't tried python 2.7 for a long while.

Hope my reply helps.

Best,
Chuan-Peng

Raquel London

unread,
Feb 18, 2021, 7:35:52 AM2/18/21
to hddm-...@googlegroups.com
Dear Chuan-Peng,

Thanks so much for your reply. I am trying to use Docker now, but I'm running into a few issues:

- I was able to access your jupyter notebook after using the (shorter) example code you provided, but, the HDDM folder is not visible. I can only see the Work and Example folders.
- I have also tried with the longer code, but it is not clear to me which paths I should use where (I think the explanation you gave in the blog post is for Linux system).
- I would like to use Spyder to run my analyses. Not Jupyter...

Sorry to bother you with this. Is there anyone else out there with a Windows 10 system that was successful in installing HDDM (with or without using Docker)?

Thanks again,
Raquel


--
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/RpS9O9O7Fwc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hddm-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hddm-users/a61489e0-f31f-4785-a17d-d53e5fb749c1n%40googlegroups.com.

Sarah Vassall

unread,
Feb 19, 2021, 12:55:18 PM2/19/21
to hddm-users
Raquel, I had some issues that forced me to uninstall and reinstall everything. When I tried to run through Docker, I also did not see the HDDM folder in Jupyter notebook. I uploaded an old notebook but it's not running at optimal speed now, so I would also love some help on this!

hcp...@gmail.com

unread,
Feb 20, 2021, 9:24:53 PM2/20/21
to hddm-users
Hi, Raquel,

See below:

- I was able to access your jupyter notebook after using the (shorter) example code you provided, but, the HDDM folder is not visible. I can only see the Work and Example folders.

--> Great that you can run the example script, you almost there! You couldn't find the `HDDM` folder because of the mounting issue. That said, docker didn't mount the local folder to the container appropriately. see below for my explanation.

- I have also tried with the longer code, but it is not clear to me which paths I should use where (I think the explanation you gave in the blog post is for Linux system).

--> You are right, I didn't explain it clearly on that web page, see below for more details about the longer code for windows machines:

docker run -it --rm --cpus=5 -e NB_USER=jovyan -e CHOWN_HOME=yes -e CHOWN_EXTRA_OPTS='-R' -w /home/jovyan/ -v /d/hcp4715/hddm_docker:/home/jovyan/hddm -p 8888:8888 hcp4715/hddm:container jupyter notebook

The bold part is about mounting local folder to the docker container
`-v` is the command about mounting folders
`/d/hcp4715/hddm_docker` is my local folder under drive D. In windows, it appears as D:\hcp4715\hddm_docker
`/home/jovyan/hddm` is the directory in the docker container. Because the docker container itself like a mini virtual linux system, so the file system inside the docker container is linux style.

- I would like to use Spyder to run my analyses. Not Jupyter...

--> I am sorry, currently, I can't help on this issue, because it means we need to install Spyder inside the docker, which I haven't tried before.

Best,
Chuan-Peng

Raquel London

unread,
Feb 22, 2021, 10:00:43 AM2/22/21
to hddm-users
Update:

I seemed to now have successfully installed hddm on my Windows 10 machine, following Esin Turkakin's steps (for Mac):

conda create --name py36 python=3.6
conda activate py36
conda install conda-build
conda install pymc3
conda install pandas patsy matplotlib scipy tqdm
pip install cython
pip install hddm

After this, I successfully ran Spyder and hddm. I do have to mention that while most things seem to work, some hddm functions are not working properly, or at all. I might delve into this later.

Thanks,
Raquel

Raquel London

unread,
Feb 22, 2021, 10:06:26 AM2/22/21
to hddm-users
Hi Chuan-Peng,

Thank you for your help and explanation! It is much appreciated. I might try this approach still, and switch from Spyder to Jupyter. Do you think Jupyter is a better way to interact with hddm than Spyder?

Thank you,
Raquel

Raquel London

unread,
Feb 22, 2021, 10:07:42 AM2/22/21
to hddm-users
Hey Sarah,
I've posted a short update. Hopefully Chuan-Peng's message can help you!
Good luck :)
Raquel

hcp...@gmail.com

unread,
Feb 27, 2021, 3:16:14 AM2/27/21
to hddm-users
Hi, Raquel,

Thanks for sharing your success in installing HDDM!

As for Jupyter vs. Spyder, I think it's a personal preference.

I like jupyter because it's can mix text with code (so-called literate programming), so it's easier to make notes and print out the plots. Also, it compatible with latex/markdown, which means you can include formulas and much other stuff in your notes and it still looks good.

But Spyder is very friendly for Matlab users ;).

Best,
Chuan-Peng

Thomas Carsten

unread,
May 12, 2021, 12:35:49 PM5/12/21
to hddm-users
Hi Raquel,

I just saw your message by chance and thought I'd chime in. Not all hddm-functionality may run properly for your machine because it seems that hddm does not support pymc3. So you would have to install pymc2. You can do that by "conda install pymc". It could also be because hddm only runs well for specific versions of packages it relies on (see herefor my notes below). 

For me, getting hddm to work on Windows 10 was difficult as well, but once everything is installed it works reliably. I took some notes on the install process, I hope they will be useful to you. 

----
install anaconda 3.7 for windows 64bit

install the build tools for visual basic (important!)

in Anaconda prompt: 

conda create -n hddmEnv python=3.6.10

conda activate hddmEnv


conda install pandas patsy
conda install pymc=2.3.7
conda install statmodels
pip install kabuki
pip install cython 


pip install HDDM==0.7.3

# Now I have to downgrade pandas

pip install pandas==20.0.0

install spyder version 3.3.3 for the hddmEnv via Anaconda Navigator

launch spyder via anaconda navigator
----


As you can see, that works for me for version 0.7.3, which was the current version at the time. I am not sure whether results will be same or different for the current version 0.8.0.

Cheers,
Thomas

Jadyn Park

unread,
Aug 27, 2021, 4:10:43 PM8/27/21
to hddm-users
Hi Thomas,

Thanks so much for sharing your notes! I was able to install hddm following your instructions. However, I am running into import error when I run "import hddm" on my jupyter notebook: 

ModuleNotFoundError Traceback (most recent call last) 
<ipython-input-1-e6207c669271> in <module> 
----> 1 import hddm 
  ModuleNotFoundError: No module named 'hddm'

I'm a Mac user (Big Sur). 'which python' points to the Anaconda Python: /Users/Jadyn/opt/anaconda3/bin/python 

Has anyone else run into this issue?

Thanks,
Jadyn

Alexander Fengler

unread,
Aug 30, 2021, 2:42:38 PM8/30/21
to hddm-users
Hi Jadyn, 

I assume you CAN import hddm using the python interpreter directly once you have it installed.
Could it be that the environment you used to load jupyter (and therefore jupyter's default kernel), does not have hddm installed?

Best,
Alex

Reply all
Reply to author
Forward
0 new messages