EI-CoreBioinformatics / reat

Robust Eukaryotic Annotation Toolkit
https://reat.readthedocs.io/en/latest/
MIT License
17 stars 3 forks source link

Need more instructions to setup REAT in Conda #24

Closed sanyalab closed 2 years ago

sanyalab commented 2 years ago

Hi Yanes,

I have followed your instructions in the READ.me and here to setup the CONDA environment for REAT. However, I think some more instructions are necessary. For example, "pip install ./reat" does not work after setting up the environment as "reat" program is not there. Then I tried "python3 setup.py build". This did not work. I then installed "Cythonize", built the tool and "python3 setup.py install". This also gave me some other errors.

Can you provide clearer instructions for setting up REAT in conda?

Thanks

ljyanesm commented 2 years ago

Dear @sanyalab,

Thank you for reporting this issue, in the first instance, could you try the instructions in the following page: https://reat.readthedocs.io/en/latest/

If these instructions give you issues, could you please share the error message with us, so we can best help you?

Kindly, Luis

sanyalab commented 2 years ago

Hi Luis,

Thanks for replying. This is where I am right now

1) git clone https://github.com/ei-corebioinformatics/reat = Worked OK! 2) wget https://github.com/broadinstitute/cromwell/releases/download/62/cromwell-62.jar = Worked OK! 3) conda env create -f reat/reat.yml = Worked OK! 4) pip install ./reat = Throwing Errors (Attached file)

I stopped the installation as it was taking over 30 mins, stuck at the last error line. I tried pip3 instaead of pip. Same errors with "greenlet" and "SQLAlchemy" taking way too long

Thanks -Abhijit

Errors.txt

ljyanesm commented 2 years ago

Dear @sanyalab,

Could you please try using python 3.8 as this has been the version we have used for our automated tests and I can be certain is functioning well. Also, please note that you are trying to install reat in the 'base' conda environment, could you try activating the 'reat' conda environment you've just created?

Many thanks, Luis

sanyalab commented 2 years ago

Hi Luis,

So after point 3 conda env create -f reat/reat.yml I have to do conda activate reat and then pip install ./reat Correct? I'll install python 3.8 in the reat env before this.

Thanks Abhijit

sanyalab commented 2 years ago

Hi Luis,

Can you confirm if my understanding is correct?

Thanks Abhijit

ljyanesm commented 2 years ago

Yes, that is correct

dadrasarmin commented 2 years ago

Hi Luis,

I have the same issue. I am trying to install it as mentioned above and in the readme file (I also tried the one on https://reat.readthedocs.io/en/latest/index.html and I was not successful). Unfortunately, using python 3.8 has not solved the problem.

Pip will install "SQLAlchemy_Utils-0.37.2-py3-none-any.whl" and "greenlet-0.1.tar.gz", due to compatibility issues and then throw an error:

` ERROR: Command errored out with exit status 1: command: /opt/sw/rev/21.12/haswell/gcc-9.3.0/anaconda3-2021.05-e3srav/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vcwzz_3b/greenlet_69b7e67c31fe444b8aea8e75dde66370/setup.py'"'"'; file='"'"'/tmp/pip-install-vcwzz_3b/greenlet_69b7e67c31fe444b8aea8e75dde66370/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-_jzv_4fv cwd: /tmp/pip-install-vcwzz_3b/greenlet_69b7e67c31fe444b8aea8e75dde66370/ Complete output (8 lines): Traceback (most recent call last): File "", line 1, in File "/tmp/pip-install-vcwzz_3b/greenlet_69b7e67c31fe444b8aea8e75dde66370/setup.py", line 3, in import ez_setup File "/tmp/pip-install-vcwzz_3b/greenlet_69b7e67c31fe444b8aea8e75dde66370/ez_setup/init.py", line 176 print "Setuptools version",version,"or greater has been installed." ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Setuptools version",version,"or greater has been installed.")?

WARNING: Discarding https://files.pythonhosted.org/packages/8e/6d/59d9a80285c4fef1254d4f589dda87d593e7316082ff94ad2f277eafca22/greenlet-0.1.tar.gz#sha256=5d71dd7e5acb64333c387fbf215f0019ffcdaeab46bb4d30f9ff6ccc94e41710 (from https://pypi.org/simple/greenlet/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.`

Then, it proceeded a with downloading a few more packages and got frozen at this step: Downloading SQLAlchemy-1.4.0-cp38-cp38-manylinux2014_x86_64.whl (1.5 MB)

Based on my understanding there is an update somewhere in SQLAlchemy or greenlet that cannot be resolved. Could you please specify the versions you used for these packages? Also, if it is possible, could you share the exact python version [3.8.0-3.8.13]? I also suggest adding the python version requirement to reat.yaml file.

ljyanesm commented 2 years ago

Dear @dadrasarmin, @sanyalab,

I've just tried installing in a clean environment using the installation instructions in the readme (https://reat.readthedocs.io/en/latest/#installation) and it worked correctly.

I think there might be some incompatibility issues with the configuration of your system.

Could you confirm you can install REAT in a clean docker environment, i.e. conda/miniconda3?

Kindly, @ljyanesm

dadrasarmin commented 2 years ago

Dear @ljyanesm,

Thank you for your swift reply. Based on your reply, I found a solution. I do not use conda/miniconda3 and instead I have access to anaconda3/2021.05. I am using an HPC. Since I have no root permission, I changed the installation procedure a little bit to install reat in a "clean" environment as you suggested. This is the procedure that worked for me:

There are some ready to use packages on the HPC, and we can load them:

  1. module load anaconda3/2021.05
  2. module load python/3.8.6 Then, I created a virtual environment via python on my home directory and load it:
  3. python -m venv reat
  4. source reat/bin/activate Then, I created and activate the conda environment for reat:
  5. conda env create -f reat/reat.yml
  6. conda activate REAT To avoid any cache problems, I called pip with --no-cache-dir:
  7. pip install --no-cache-dir ./reat I can confirm that reat is installed successfully via:
  8. reat --help

I have to activate both conda environment and load the python environment as follows when I log into the HPC (or add them to my .profile):

  1. conda activate REAT
  2. source reat/bin/activate

I wrote it in detail to help others like me.

ljyanesm commented 2 years ago

Dear @dadrasarmin,

Thank you very much for the feedback and for sharing details on how to install REAT for other users. I am sure others will find this information useful.

sanyalab commented 2 years ago

Hi @dadrasarmin and @ljyanesm

I was a little late to try this out, but the following worked for me.

1) git clone https://github.com/ei-corebioinformatics/reat 2) wget https://github.com/broadinstitute/cromwell/releases/download/62/cromwell-62.jar 3) conda env create -f reat/reat.yml 4) conda activate REAT 5) pip install --no-cache-dir ./reat 6) reat --help

Output of step 6 (shortened....)

Welcome to REAT version - 0.6.1

Command-line call: /home/sanyalab/anaconda3/envs/REAT/bin/reat --help

usage: reat [-h] [-j JAR_CROMWELL] [-r RUNTIME_CONFIGURATION] -c COMPUTATIONAL_RESOURCES [-o OUTPUT_PARAMETERS_FILE] [--workflow_options_file WORKFLOW_OPTIONS_FILE] {transcriptome,homology,prediction} ...