splicebox / MntJULiP

Comprehensive and scalable differential splicing analyses

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error during installation

alexzaccaron opened this issue · comments

Hello,

I'm having problems trying to install MntJULiP. I have GCC v7.5 and Python 3.7.4 on Ubuntu 18.04. When I run setup.py install --user, I get this error:

ERROR: rich 9.3.0 has requirement typing-extensions<4.0.0,>=3.7.4, but you'll have typing-extensions 4.0.0 which is incompatible.

And then

make[2]: Leaving directory '/home/azacca/projects/fulvum_ras/MntJULiP/src/samtools-0.1.19/misc'
make[1]: Leaving directory '/home/azacca/projects/fulvum_ras/MntJULiP/src/samtools-0.1.19'
mkdir -p ../bin
g++ -o ../bin/junc -I./samtools-0.1.19 -L./samtools-0.1.19 -Wall -O3  junc.o -lbam -lz -lm -lpthread 
rm -f *.o *.gch
Traceback (most recent call last):
  File "build_modules.py", line 3, in <module>
    from models import init_null_BN_model, init_alt_BN_model, init_null_DM_model, init_alt_DM_model
  File "/home/azacca/projects/fulvum_ras/MntJULiP/models.py", line 7, in <module>
    import pystan
ModuleNotFoundError: No module named 'pystan'

Detailed commands and output are attached.

Any idea of what I am doing wrong?
install_mntjulip.md

Hi alexzaccaron, thank you for bring this issue, I'll try to reproduce your issue and provide a solution.

alexzaccaron, do you run the setup.py by command "python3 setup.py install --user"? If not, can you try that and see if it can solve the issue. The error may come from python 2.7, "python" command usually links to python 2.x
My another suggestion is to manually install the required packages by command:
pip3 install --user numpy scipy pandas pystan statsmodels "dask[complete]"

Hi @Guangyu-Yang,
Yes, I executed python3 setup.py install --user to install.

I tried to manually install the required packages as you suggested with pip3 install --user numpy scipy pandas pystan statsmodels "dask[complete]". Looks like it install everything without a problem. Then I tried again python3 setup.py install --user. I am no longer getting the error ERROR: rich 9.3.0 has requirement typing-extensions<4.0.0,>=3.7.4, but you'll have typing-extensions 4.0.0 which is incompatible.. However, the installation is still not successful. Looks like it gets stuck when attempting to compile SAMtools:

make[2]: Leaving directory '/home/azacca/projects/fulvum_ras/MntJULiP/src/samtools-0.1.19/misc'
make[1]: Leaving directory '/home/azacca/projects/fulvum_ras/MntJULiP/src/samtools-0.1.19'
mkdir -p ../bin
g++ -o ../bin/junc -I./samtools-0.1.19 -L./samtools-0.1.19 -Wall -O3  junc.o -lbam -lz -lm -lpthread 
rm -f *.o *.gch
Traceback (most recent call last):
  File "build_modules.py", line 3, in <module>
    from models import init_null_BN_model, init_alt_BN_model, init_null_DM_model, init_alt_DM_model
  File "/home/azacca/projects/fulvum_ras/MntJULiP/models.py", line 7, in <module>
    import pystan
ModuleNotFoundError: No module named 'pystan'
Traceback (most recent call last):
  File "setup.py", line 41, in <module>
    'install': MyInstall,
  File "/home/azacca/.local/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/share/apps/python3-3.7.4/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/share/apps/python3-3.7.4/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/share/apps/python3-3.7.4/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "setup.py", line 19, in run
    subprocess.check_output(['python3', 'build_modules.py'])
  File "/share/apps/python3-3.7.4/lib/python3.7/subprocess.py", line 395, in check_output
    **kwargs).stdout
  File "/share/apps/python3-3.7.4/lib/python3.7/subprocess.py", line 487, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['python3', 'build_modules.py']' returned non-zero exit status 1.

Detailed output in the .md attached.
install_mntjulip_2.md

Hi @alexzaccaron, based on the error messages, it may not be the issue of samtools, it could be the issue of PyStan. According to the PyStan homepage, the latest version requires C++ compiler: gcc ≥9.0 or clang ≥10.0. If that's the case, there are two solutions, either upgrade the gcc version to 9.0 or later, or install an older version of PyStan (try "pip3 install pystan==2.19.1.1 --user"), could solve this issue.

Hi @Guangyu-Yang,

You are right. It worked when I downgraded PyStan to version 2.19.1.1 as you suggested.
Just for curiosity, I tried to make a fresh install by using GCC v9.2 and PyStan v3.3.0, but it failed with the same error as before.

Anyway, it's working now.
Thank you for your help.

Great! For GCC v9.2 and PyStan v3.3.0, I'm not sure, it might be the case that PyStan v3.3.0 doesn't support some of the new features in GCC v9.2 or the dependencies changed. I don't know, have to print out the gcc error messages and figure out.

Thank you for using our tool, feel free to let us know if you encounter other issues and any suggestion for improving the tool is welcome! ;)