Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble importing modules #5

Closed
ClarenceBLe opened this issue Jun 21, 2023 · 6 comments
Closed

Trouble importing modules #5

ClarenceBLe opened this issue Jun 21, 2023 · 6 comments

Comments

@ClarenceBLe
Copy link

Greetings,

I have been trying to run WITCH, but have been receiving the following messages:

Traceback (most recent call last):
File "/WITCH/witch.py", line 8, in
from gcmm.gcmm import mainAlignmentProcess
File "
/WITCH/gcmm/gcmm.py", line 9, in
from gcmm.algorithm import DecompositionAlgorithm, SearchAlgorithm
File "/WITCH/gcmm/algorithm.py", line 9, in
from helpers.alignment_tools import Alignment, MutableAlignment
File "
/WITCH/helpers/alignment_tools.py", line 8, in
from dendropy.datamodel.taxonmodel import Taxon
ModuleNotFoundError: No module named 'dendropy'

When looking into each directory and specific file, the cited lines are simply module import lines and I wanted to know if there were any specific changes that could resolve these.

-Clarence

@c5shen
Copy link
Owner

c5shen commented Jun 21, 2023

Hi Clarence, please try installing (or updating) the Dendropy python package on your running environment. You can also run the following script pip3 install -r requirements.txt to install all necessary packages for WITCH. I am also working on a dockerfile for WITCH to make the software more accessible to users.

@ClarenceBLe
Copy link
Author

Thank you for the timely response! I ran the pip3 line successfully, but am still receiving the same messages from the initial message. I also used 'conda install dendropy' in my current conda env and that worked fine. I'm currently looking in the */gcmm/tree.py file (lines 27 and 282), and wanted to know if this was an issue since there was no '_convert_node_to_root_polytomy' function that I saw in the 'dendropy' documentation.
Screenshot 2023-06-21 at 11 28 11 AM

@c5shen
Copy link
Owner

c5shen commented Jun 21, 2023

I found the relevant issue that caused your problem here: (SEPP also uses Dendropy and Dendropy 4.6.0 moved the function to be private). Thus, downgrading your Dendropy to v4.4.0-4.5.3 should be a workaround for the issue.

Thanks for bringing this up, and I want to change my code so that it does not depend on Dendropy (I want to switch to TreeSwift in the future update.

@c5shen
Copy link
Owner

c5shen commented Jun 21, 2023

As of now, I will change the requirements.txt to dendropy>=4.4.0,<4.6.0.

@ClarenceBLe
Copy link
Author

Fantastic! Thank you so much for your feedback.

@c5shen
Copy link
Owner

c5shen commented Jun 21, 2023

Glad I helped. I will close the issue now.

@c5shen c5shen closed this as completed Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants