-
Notifications
You must be signed in to change notification settings - Fork 38
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
Track internal dendropy reorganization #126
Conversation
I am having the same issue as #125: When I try runupp.py -h, it fails with error "ImportError: cannot import name '_convert_node_to_root_polytomy'. As far as I can discern, it looks like this post provides a temporary solution to the problem, but I am not experienced enough to understand what the solution is. Could you please explain, as if to a child, how I can use the "PR patch" to get UPP/SEPP running? (I just did a fresh install of SEPP, so I guess this patch isn't included in the current install?) |
try
python3 -m pip install dendropy —upgrade
— is two dashes
Matthew
On Thu, Jul 13, 2023 at 19:27 aravenscraft ***@***.***> wrote:
I am having the same issue as #125
<#125>: When I try *runupp.py -h*,
it fails with error "ImportError: cannot import name
'_convert_node_to_root_polytomy'. As far as I can discern, it looks like
this post provides a temporary solution to the problem, but I am not
experienced enough to understand what the solution is. Could you please
explain, as if to a child, how I can use the "PR patch" to get UPP/SEPP
running? (I just did a fresh install of SEPP, so I guess this patch isn't
included in the current install?)
—
Reply to this email directly, view it on GitHub
<#126 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACSDYRJRUZFQQDYVTB4UDLDXQCU7ZANCNFSM6AAAAAAYH4YZ3Q>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Matthew Andres Moreno
https://mmore500.github.io
|
Thank you for the quick reply! I've spent hours and hours trying to solve this one problem, and I'm no closer to a solution. I tried your suggestion but got the same error: (py37) biol-128379:seppRuns ravenscrafta$ python3 -m pip install dendropy --upgrade |
Looks like your dendropy install is via anaconda
conda activate py37
conda update dendropy
any luck?
On Fri, Jul 14, 2023 at 09:29 aravenscraft ***@***.***> wrote:
Thank you for the quick reply! I've spent hours and hours trying to solve
this one problem, and I'm no closer to a solution. I tried your suggestion
but got the same error:
(py37) biol-128379:seppRuns ravenscrafta$ python3 -m pip install dendropy
--upgrade
Requirement already satisfied: dendropy in
/Users/ravenscrafta/miniconda3/envs/py37/lib/python3.7/site-packages/DendroPy-4.6.1-py3.7.egg
(4.6.1)
Requirement already satisfied: setuptools in
/Users/ravenscrafta/miniconda3/envs/py37/lib/python3.7/site-packages (from
dendropy) (68.0.0)
(py37) biol-128379:seppRuns ravenscrafta$ run_sepp.py -h
/Users/ravenscrafta/miniconda3/envs/py37/bin/run_sepp.py:4:
DeprecationWarning: pkg_resources is deprecated as an API. See
https://setuptools.pypa.io/en/latest/pkg_resources.html
*import*('pkg_resources').run_script('sepp==4.5.2', 'run_sepp.py')
Traceback (most recent call last):
File "/Users/ravenscrafta/miniconda3/envs/py37/bin/run_sepp.py", line 4,
in
*import*('pkg_resources').run_script('sepp==4.5.2', 'run_sepp.py')
File
"/Users/ravenscrafta/miniconda3/envs/py37/lib/python3.7/site-packages/pkg_resources/
*init*.py", line 722, in run_script
self.require(requires)[0].run_script(script_name, ns)
File
"/Users/ravenscrafta/miniconda3/envs/py37/lib/python3.7/site-packages/pkg_resources/
*init*.py", line 1561, in run_script
exec(code, namespace, namespace)
File
"/Users/ravenscrafta/miniconda3/envs/py37/lib/python3.7/site-packages/sepp-4.5.2-py3.7.egg/EGG-INFO/scripts/run_sepp.py",
line 3, in
from sepp.exhaustive import ExhaustiveAlgorithm
File
"/Users/ravenscrafta/miniconda3/envs/py37/lib/python3.7/site-packages/sepp-4.5.2-py3.7.egg/sepp/exhaustive.py",
line 6, in
from sepp.algorithm import AbstractAlgorithm
File
"/Users/ravenscrafta/miniconda3/envs/py37/lib/python3.7/site-packages/sepp-4.5.2-py3.7.egg/sepp/algorithm.py",
line 12, in
from sepp.tree import PhylogeneticTree
File
"/Users/ravenscrafta/miniconda3/envs/py37/lib/python3.7/site-packages/sepp-4.5.2-py3.7.egg/sepp/tree.py",
line 25, in
from dendropy.datamodel.treemodel import _convert_node_to_root_polytomy as
ImportError: cannot import name '_convert_node_to_root_polytomy' from
'dendropy.datamodel.treemodel'
(/Users/ravenscrafta/miniconda3/envs/py37/lib/python3.7/site-packages/DendroPy-4.6.1-py3.7.egg/dendropy/datamodel/treemodel/
*init*.py)
—
Reply to this email directly, view it on GitHub
<#126 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACSDYRKAKIPB3A3PFN2XODDXQFXWTANCNFSM6AAAAAAYH4YZ3Q>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Matthew Andres Moreno
https://mmore500.github.io
|
@mmore500 thanks for the suggested fix. Were you able to test this? Did it work fine in your hands? |
I don’t have an anaconda install so I wasn’t able to test — just guessing!
Only other suggestions I could provide are to try uninstalling everything
and starting fresh. Sometimes that works. Past that, you might also look
into working in a virtual environment or even a container.
…--
Matthew Andres Moreno
https://mmore500.github.io
|
Tried it, no luck. :-/ Not sure if this is related, but it tells me to update my version of conda. I tried to, but the update command didn't work. biol-128379:~ ravenscrafta$ conda activate py37 ==> WARNING: A newer version of conda exists. <== Please update conda by running
All requested packages already installed.Retrieving notices: ...working... done ==> WARNING: A newer version of conda exists. <== Please update conda by running
All requested packages already installed.Retrieving notices: ...working... done ==> WARNING: A newer version of conda exists. <== Please update conda by running
All requested packages already installed.Retrieving notices: ...working... done |
I also tried deleting SEPP and dendropy and running a fresh install, as you recommended. The installation works, except that it gives me the error: Could not find suitable distribution for Requirement.parse('dendropy>=4.0.0'). I think I got this same error when I previously tried to install SEPP. ...Could my operating system just be too old? biol-128379:~ ravenscrafta$ git clone https://github.com/smirarab/sepp.git Creating main sepp config file at /Users/ravenscrafta/.sepp/main.config and tools at /Users/ravenscrafta/.sepp Installed /Library/Python/2.7/site-packages/sepp-4.5.2-py2.7.egg |
In the SEPP tutorial, it says that I can run SEPP on a virtual machine. I installed VirtualBox but when I click the link in the tutorial to download the Ubuntu VM image with SEPP installed, I get a Google Drive page that says "Sorry, the file you have requested does not exist." Is the VM image no longer available? |
Just realized —- I think I had my advice backward. You don’t need to be
installing the newest version of dendropy, you need to install a slightly
older version. The problem was that dendropy updated some internal code
that SEPP was using. You want to use a version of dendropy from before that
update.
Try
conda install dendropy==4.5.2
Matthew
On Fri, Jul 14, 2023 at 20:04 aravenscraft ***@***.***> wrote:
Tried it, no luck. :-/ Not sure if this is related, but it tells me to
update my version of conda. I tried to, but the update command didn't work.
biol-128379:~ ravenscrafta$ conda activate py37
(py37) biol-128379:~ ravenscrafta$ conda update dendropy
Collecting package metadata (current_repodata.json): done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.14.0
latest version: 23.5.2
Please update conda by running
$ conda update -n base -c conda-forge conda
All requested packages already installed.
Retrieving notices: ...working... done
(py37) biol-128379:~ ravenscrafta$ run_sepp.py -h
/Users/ravenscrafta/miniconda3/envs/py37/bin/run_sepp.py:4:
DeprecationWarning: pkg_resources is deprecated as an API. See
https://setuptools.pypa.io/en/latest/pkg_resources.html
*import*('pkg_resources').run_script('sepp==4.5.2', 'run_sepp.py')
Traceback (most recent call last):
File "/Users/ravenscrafta/miniconda3/envs/py37/bin/run_sepp.py", line 4,
in
*import*('pkg_resources').run_script('sepp==4.5.2', 'run_sepp.py')
File
"/Users/ravenscrafta/miniconda3/envs/py37/lib/python3.7/site-packages/pkg_resources/
*init*.py", line 722, in run_script
self.require(requires)[0].run_script(script_name, ns)
File
"/Users/ravenscrafta/miniconda3/envs/py37/lib/python3.7/site-packages/pkg_resources/
*init*.py", line 1561, in run_script
exec(code, namespace, namespace)
File
"/Users/ravenscrafta/miniconda3/envs/py37/lib/python3.7/site-packages/sepp-4.5.2-py3.7.egg/EGG-INFO/scripts/run_sepp.py",
line 3, in
from sepp.exhaustive import ExhaustiveAlgorithm
File
"/Users/ravenscrafta/miniconda3/envs/py37/lib/python3.7/site-packages/sepp-4.5.2-py3.7.egg/sepp/exhaustive.py",
line 6, in
from sepp.algorithm import AbstractAlgorithm
File
"/Users/ravenscrafta/miniconda3/envs/py37/lib/python3.7/site-packages/sepp-4.5.2-py3.7.egg/sepp/algorithm.py",
line 12, in
from sepp.tree import PhylogeneticTree
File
"/Users/ravenscrafta/miniconda3/envs/py37/lib/python3.7/site-packages/sepp-4.5.2-py3.7.egg/sepp/tree.py",
line 25, in
from dendropy.datamodel.treemodel import _convert_node_to_root_polytomy as
ImportError: cannot import name '_convert_node_to_root_polytomy' from
'dendropy.datamodel.treemodel'
(/Users/ravenscrafta/miniconda3/envs/py37/lib/python3.7/site-packages/dendropy/datamodel/treemodel/
*init*.py)
(py37) biol-128379:~ ravenscrafta$ conda update -n base -c conda-forge
conda
Collecting package metadata (current_repodata.json): done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.14.0
latest version: 23.5.2
Please update conda by running
$ conda update -n base -c conda-forge conda
All requested packages already installed.
Retrieving notices: ...working... done
(py37) biol-128379:~ ravenscrafta$ conda update dendropy
Collecting package metadata (current_repodata.json): done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.14.0
latest version: 23.5.2
Please update conda by running
$ conda update -n base -c conda-forge conda
All requested packages already installed.
Retrieving notices: ...working... done
(py37) biol-128379:~ ravenscrafta$ run_sepp.py -h
/Users/ravenscrafta/miniconda3/envs/py37/bin/run_sepp.py:4:
DeprecationWarning: pkg_resources is deprecated as an API. See
https://setuptools.pypa.io/en/latest/pkg_resources.html
*import*('pkg_resources').run_script('sepp==4.5.2', 'run_sepp.py')
Traceback (most recent call last):
File "/Users/ravenscrafta/miniconda3/envs/py37/bin/run_sepp.py", line 4,
in
*import*('pkg_resources').run_script('sepp==4.5.2', 'run_sepp.py')
File
"/Users/ravenscrafta/miniconda3/envs/py37/lib/python3.7/site-packages/pkg_resources/
*init*.py", line 722, in run_script
self.require(requires)[0].run_script(script_name, ns)
File
"/Users/ravenscrafta/miniconda3/envs/py37/lib/python3.7/site-packages/pkg_resources/
*init*.py", line 1561, in run_script
exec(code, namespace, namespace)
File
"/Users/ravenscrafta/miniconda3/envs/py37/lib/python3.7/site-packages/sepp-4.5.2-py3.7.egg/EGG-INFO/scripts/run_sepp.py",
line 3, in
from sepp.exhaustive import ExhaustiveAlgorithm
File
"/Users/ravenscrafta/miniconda3/envs/py37/lib/python3.7/site-packages/sepp-4.5.2-py3.7.egg/sepp/exhaustive.py",
line 6, in
from sepp.algorithm import AbstractAlgorithm
File
"/Users/ravenscrafta/miniconda3/envs/py37/lib/python3.7/site-packages/sepp-4.5.2-py3.7.egg/sepp/algorithm.py",
line 12, in
from sepp.tree import PhylogeneticTree
File
"/Users/ravenscrafta/miniconda3/envs/py37/lib/python3.7/site-packages/sepp-4.5.2-py3.7.egg/sepp/tree.py",
line 25, in
from dendropy.datamodel.treemodel import _convert_node_to_root_polytomy as
ImportError: cannot import name '_convert_node_to_root_polytomy' from
'dendropy.datamodel.treemodel'
(/Users/ravenscrafta/miniconda3/envs/py37/lib/python3.7/site-packages/dendropy/datamodel/treemodel/
*init*.py)
(py37) biol-128379:~ ravenscrafta$ conda deactivate
—
Reply to this email directly, view it on GitHub
<#126 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACSDYRK2G4QEZ2IYH3KIXE3XQICFXANCNFSM6AAAAAAYH4YZ3Q>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Matthew Andres Moreno
https://mmore500.github.io
|
THAT WORKED! Thank you!! |
:D
On Mon, Jul 17, 2023 at 08:48 aravenscraft ***@***.***> wrote:
THAT WORKED! Thank you!!
—
Reply to this email directly, view it on GitHub
<#126 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACSDYRO55BIWWF5C4NBWF7TXQVNFZANCNFSM6AAAAAAYH4YZ3Q>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Matthew Andres Moreno
https://mmore500.github.io
|
Sorry, I didn't mean your solution for aravenscraft's problem. I meant the PR. Did that code change work for you? I don't suppose you know if the edited code works with old dendropy as well? |
Apologies for the confusion —- I must have gotten mixed up in replying to the messages! Just opened this up and used some commands from Only note is that tests aren’t compatible with Python3.10+ due to removal of deprecated aliases to Collections Abstract Base Classes from the collections module https://docs.python.org/3/whatsnew/3.10.html#removed |
Would you be interested in a pull request to get CI back up and running? Looks like Travis is no longer active. |
Would it be possible to merge this PR and release a fix? It seems to be working on my machine at least, and the current state causes the bioconda package to break (see bioconda/bioconda-recipes#43112). |
A note for those coming here to solve their sepp issue (as I did today) - I had dendropy installed both via conda and pip, and so downgrading dendropy via conda didn't work until I uninstalled the pip version as well. (look at "conda list" vs "pip list"). |
Hi @smirarab any word on getting this merged? I’m getting lots of folks on the Dendropy issue tracker related to this issue and would really appreciate getting this fix in place to cut down on that workload on my end. |
I just merged but I am currently a bit unavailable and unable to test. Can you check this merged version works fine? |
#125 appears to be due to reorganization of internal implementation details in dendropy. This PR patches sepp to follow the new internal organization for dendropy >=4.6.0
Also bumped the pinned version on sepp's dendropy requirement in setup.py.