Skip to content

Installation Troubleshooting

Sherry edited this page Feb 14, 2022 · 8 revisions

Installation

I: Installation process is stalling when running ./scripts/install_moseq2_app.sh.
S: If GitHub is stalling when trying to clone MoSeq repos, run git pull before the installation command.


Q: I am experiencing a GCC, autoregressive, or moseq2-model related error while running the ./scripts/install_moseq2_app.sh command in moseq2-app. What do I do?
A: First, make sure you have a compatible version of GCC installed. You can do this by running the following command(s):

# below commands output a path similar to: /usr/local/bin/gcc-7
which gcc-7 
which g++-7

If either of the paths are not showing up, follow the following instructions:

For Mac users:

# install homebrew if it is not already installed
brew install gcc@7

For Linux users:

sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install g++-7 -y

Next, create environmental variables to indicate to MoSeq explicitly which gcc versions to use:

export CC="$(which gcc-7)"
export CXX="$(which g++-7)"

Finally, run the installation script again: ./scripts/install_moseq2_app.sh


Q: How can I install the autoregressive module separately?
A: First step is to ensure you have the compatible version of GCC/GXX installed and have the environmental variables previously exported. (shown below)

which gcc-7
>> /usr/local/bin/gcc-7 
which g++-7
>> /usr/local/bin/g++-7 

If either of the above commands do not emit an output, follow the steps in the issue above. Otherwise, to set an environmental variable and check whether it exists, run the following commands:

# setting the environmental variable (this will not emit any output)
export CC="$(which gcc-7)" 
export CXX="$(which g++-7)"

# checking whether the previously set environmental variable exists, if so, each `echo` command will output a path.
echo $CC
>> /usr/local/bin/gcc-7 
echo $CXX
>> /usr/local/bin/g++-7 

Next, clone the repository, and install it using pip.

git clone https://github.com/dattalab/pyhsmm-autoregressive.git autoregressive
cd autoregressive
pip install .

Q: While trying to install moseq2-model I get an error about no option --process-dependency-links, what's the deal?
A: We're aware of this issue, pip version 19 broke dependency links, and we've issued a patch to fix this. In the meantime you can simply downgrade pip by issues, pip install "pip<19" and trying to reinstall moseq2-model with --process-dependency-links.


Q: Why do I get an OpenMP error when trying to install MoSeq2-model on a Mac?
A: This is an issue with the Mac-supplied version of gcc. Install the latest gcc using homebrew then set your gcc and gxx to use the homebrew version. . Note that this command is relevant for gcc-7, this may change at any point to, e.g. gcc-8. Run ls /usr/local/bin/gcc* to determine the gcc version you have.

# to install gcc, run the following:
brew install gcc
export CC="$(which gcc-7)" # if you have version 7
export CXX="$(which g++-7)" # if you have version 7

If you installed moseq2-model via git clone https://github.com/dattalab/moseq2-model.git, run the following:

# navigate to where you downloaded the MoSeq repositories, i.e.,
cd ~/python_repos/moseq2-model/
# install the current directory, same as `pip install -e $PWD`
pip install -e .

If you installed it via pip install git+https://github.com/dattalab/moseq2-model.git then try re-installing with the same command.


Q: I am STILL seeing compilation errors for installing MoSeq2-model on a Mac (esp. OS X Mojave)?
A: Follow the instructions here, in particular you'll need to reinstall the macOS SDK headers using open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg after installing the latest version of xcode.


Q: Why I do get an error about logsumexp not being imported correctly when running moseq2-model?
A: SciPy changed the import path for the function logsumexp in v1.0. You can install the latest version before 1.0 via pip install scipy<1.0 (pass the force option if necessary).


Q: I am using Windows 10 with WSL but I am not able to install MoSeq?

A: Make sure you have WSL VERSION 2. You can check your version in Command Prompt by running

wsl --list --verbose

Q: I have WSL VERSION 1 and I have trouble upgrading to WSL2. What do I do? A: This solution is provided by our user. Thanks, Inis!

Step 1: Enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS. Check out this link for more information.

Step 2: In Command Prompt run

wsl --set-default-version 2 #set the default wsl to version 2
wsl --set-version Ubuntu 2 #ensure ubuntu is using it...no need to 
specify which ubuntu is currently had 
wsl --list --verbose # check if Ubuntu is indeed running on wsl 2

Check out this link for more information.


Clone this wiki locally