Open maxdevblock opened 3 years ago
bumping this, any workarounds?
Made a pull request to fix this #39
Any news concerning this issue?
Yeah, I too have a problem with this issue yet unsolved that I could not import. #
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[2], [line 1](vscode-notebook-cell:?execution_count=2&line=1)
----> [1](vscode-notebook-cell:?execution_count=2&line=1) import phylopandas as ph
File [c:\Users\muham\AppData\Local\Programs\Python\Python312\Lib\site-packages\phylopandas\__init__.py:28](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/__init__.py:28)
[25](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/__init__.py:25) from pandas import DataFrame
[27](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/__init__.py:27) # Register PhyloPandas Methods
---> [28](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/__init__.py:28) from .core import PhyloPandasDataFrameMethods as _PhyloPandasDataFrameMethods
[29](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/__init__.py:29) from .core import PhyloPandasSeriesMethods as _PhyloPandasSeriesMethods
[30](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/__init__.py:30) from .seqio import *
File [c:\Users\muham\AppData\Local\Programs\Python\Python312\Lib\site-packages\phylopandas\core.py:5](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/core.py:5)
[2](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/core.py:2) import pandas as pd
[3](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/core.py:3) from pandas_flavor import register_dataframe_accessor, register_series_accessor
----> [5](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/core.py:5) from . import seqio
[6](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/core.py:6) from . import treeio
[9](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/core.py:9) try:
File [c:\Users\muham\AppData\Local\Programs\Python\Python312\Lib\site-packages\phylopandas\seqio\__init__.py:1](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/seqio/__init__.py:1)
----> [1](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/seqio/__init__.py:1) from .read import (read_embl,
[2](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/seqio/__init__.py:2) read_fasta,
[3](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/seqio/__init__.py:3) read_fastq,
[4](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/seqio/__init__.py:4) read_nexus_seq,
[5](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/seqio/__init__.py:5) read_swiss,
[6](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/seqio/__init__.py:6) read_phylip,
[7](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/seqio/__init__.py:7) read_clustal,
[8](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/seqio/__init__.py:8) read_blast_xml,
[9](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/seqio/__init__.py:9) read_phylip_relaxed,
[10](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/seqio/__init__.py:10) read_phylip_sequential)
[12](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/seqio/__init__.py:12) from . import write
File [c:\Users\muham\AppData\Local\Programs\Python\Python312\Lib\site-packages\phylopandas\seqio\read.py:10](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/seqio/read.py:10)
[8](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/seqio/read.py:8) from Bio.SeqRecord import SeqRecord
[9](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/seqio/read.py:9) from Bio.Blast import NCBIXML
---> [10](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/seqio/read.py:10) import Bio.Alphabet
[12](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/seqio/read.py:12) # Import Phylopandas DataFrame
[13](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/phylopandas/seqio/read.py:13) import pandas as pd
File [c:\Users\muham\AppData\Local\Programs\Python\Python312\Lib\site-packages\Bio\Alphabet\__init__.py:20](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/Bio/Alphabet/__init__.py:20)
[1](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/Bio/Alphabet/__init__.py:1) # Copyright 2000-2002 by Andrew Dalke.
[2](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/Bio/Alphabet/__init__.py:2) # Revisions copyright 2007-2010 by Peter Cock.
[3](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/Bio/Alphabet/__init__.py:3) # All rights reserved.
(...)
[7](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/Bio/Alphabet/__init__.py:7) # Please see the LICENSE file that should have been included as part of this
[8](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/Bio/Alphabet/__init__.py:8) # package.
[9](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/Bio/Alphabet/__init__.py:9) """Alphabets were previously used to declare sequence type and letters (OBSOLETE).
[10](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/Bio/Alphabet/__init__.py:10)
[11](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/Bio/Alphabet/__init__.py:11) The design of Bio.Aphabet included a number of historic design choices
(...)
[17](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/Bio/Alphabet/__init__.py:17) transition from Bio.Alphabet to molecule type annotations.
[18](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/Bio/Alphabet/__init__.py:18) """
---> [20](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/Bio/Alphabet/__init__.py:20) raise ImportError(
[21](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/Bio/Alphabet/__init__.py:21) "Bio.Alphabet has been removed from Biopython. In many cases, the alphabet can simply be ignored and removed from scripts. In a few cases, you may need to specify the ``molecule_type`` as an annotation on a SeqRecord for your script to work correctly. Please see https://biopython.org/wiki/Alphabet for more information."
[22](file:///C:/Users/muham/AppData/Local/Programs/Python/Python312/Lib/site-packages/Bio/Alphabet/__init__.py:22) )
ImportError: Bio.Alphabet has been removed from Biopython. In many cases, the alphabet can simply be ignored and removed from scripts. In a few cases, you may need to specify the ``molecule_type`` as an annotation on a SeqRecord for your script to work correctly. Please see https://biopython.org/wiki/Alphabet for more information
Would author @Zsailer help us regarding this problem?
Thank you
import phylopandas as ph
raises error
ImportError: Bio.Alphabet has been removed from Biopython. In many cases, the alphabet can simply be ignored and removed from scripts. In a few cases, you may need to specify the
molecule_type
as an annotation on a SeqRecord for your script to work correctly. Please see https://biopython.org/wiki/Alphabet for more information.