samsinai / FLEXS

Fitness landscape exploration sandbox for biological sequence design.
https://flexs.readthedocs.io/en/latest/index.html
Apache License 2.0
156 stars 21 forks source link

hard to install vienarna #30

Closed zhaoguangyuan123 closed 3 years ago

zhaoguangyuan123 commented 3 years ago

i use mac os and anaconda, python 3.8.5.

I install the conda env with the yml file in your repo. However, when I run the tutorial file, it always says the it cannot import RNA. Would there be any manual way to fix this bug? Appreciate it. Guangyuan


`
landscape = flexs.landscapes.RNABinding(**problem['params'])
alphabet = s_utils.RNAA
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
~/FLEXS/flexs/landscapes/rna.py in __init__(self, targets, seq_length, conserved_region)
     54         try:
---> 55             RNA
     56         except NameError as e:

NameError: name 'RNA' is not defined

The above exception was the direct cause of the following exception:

ImportError                               Traceback (most recent call last)
 in 
----> 1 landscape = flexs.landscapes.RNABinding(**problem['params'])
      2 alphabet = s_utils.RNAA

~/FLEXS/flexs/landscapes/rna.py in __init__(self, targets, seq_length, conserved_region)
     55             RNA
     56         except NameError as e:
---> 57             raise ImportError(
     58                 f"{e}.\n"
     59                 "Hint: ViennaRNA not installed.\n"

ImportError: name 'RNA' is not defined.
Hint: ViennaRNA not installed.
      Source and binary installations available at https://www.tbi.univie.ac.at/RNA/#download.
      Conda installation available at https://anaconda.org/bioconda/viennarna.`
stewy33 commented 3 years ago

Hi Guangyuan, thanks for alerting us to this issue! We are moving away from using an environment.yml file now and I updated the instructions on the Readme #31. In short, ViennaRNA seems to have issues with Python 3.8. Try following the new instructions to create a Python 3.7 environment and install flexs. It should then be easy to install ViennaRNA.

To install PyRosetta, check out the downloads page (you will need to obtain a license). Hope this helps!