<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:10px;"><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:10px;"><div></div>
<div><span><div><i>>>> from Bio import Seq</i></div></span><div><br></div><div>This should be</div><div><span><div><i>>>> from Bio.Seq import Seq</i></div></span><br></div></div><div><br></div>
</div><div id="yahoo_quoted_0171448862" class="yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Wednesday, June 27, 2018, 8:33:42 PM GMT+9, Francesco Gastaldello (Staff) <f.gastaldello@dundee.ac.uk> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div id="yiv2129460908"><style type="text/css">#yiv2129460908 #yiv2129460908 -- P {margin-top:0;margin-bottom:0;}#yiv2129460908 </style><div dir="ltr">
<div dir="ltr" id="yiv2129460908divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri, Helvetica, sans-serif;">
<b>Peter:</b>
<p style="margin-top:0;margin-bottom:0;"></p>
<div>After the upgrade to Ubuntu 18.04, my VM blow up and I had to re-build it from scratch. I'm not saying that I've made it exactly like the one that used the previous version, so I might miss some dependencies. I do not use/contribute to Biopython on my
local Wndows machine anymore (because some module gave problem when I was developing some tests).</div>
<div><br clear="none">
</div>
<div><b>Ben:</b></div>
<div>I've followed your suggestion. Directly on terminal (not via PyCharm or other IDE) I've entered the virtual environment dedicated to biopython and build+installed it from the source code. I get this in the console:</div>
<div><br clear="none">
</div>
<div>--</div>
<div>
<div><i>(biopython) gasta@gasta-VirtualBox:~/Documents/GitHub/biopython(master)$ python setup.py install</i></div>
<div><i>running install</i></div>
<div><i>running build</i></div>
<div><i>running build_py</i></div>
<div><i>running build_ext</i></div>
<div><i>running install_lib</i></div>
<div><i>copying build/lib.linux-x86_64-2.7/Bio/GenBank/__init__.py -> /home/gasta/venv/biopython/lib/python2.7/site-packages/Bio/GenBank</i></div>
<div><i>byte-compiling /home/gasta/venv/biopython/lib/python2.7/site-packages/Bio/GenBank/__init__.py to __init__.pyc</i></div>
<div><i>running install_egg_info</i></div>
<div><i>running egg_info</i></div>
<div><i>writing requirements to biopython.egg-info/requires.txt</i></div>
<div><i>writing biopython.egg-info/PKG-INFO</i></div>
<div><i>writing top-level names to biopython.egg-info/top_level.txt</i></div>
<div><i>writing dependency_links to biopython.egg-info/dependency_links.txt</i></div>
<div><i>reading manifest file 'biopython.egg-info/SOURCES.txt'</i></div>
<div><i>reading manifest template 'MANIFEST.in'</i></div>
<div><i>warning: no previously-included files matching '*.pyo' found anywhere in distribution</i></div>
<div><i>warning: no previously-included files matching '*.py{}' found anywhere in distribution</i></div>
<div><i>warning: no previously-included files matching '*.py-e' found anywhere in distribution</i></div>
<div><i>writing manifest file 'biopython.egg-info/SOURCES.txt'</i></div>
<div><i>removing '/home/gasta/venv/biopython/lib/python2.7/site-packages/biopython-1.72-py2.7.egg-info' (and everything under it)</i></div>
<div><i>Copying biopython.egg-info to /home/gasta/venv/biopython/lib/python2.7/site-packages/biopython-1.72-py2.7.egg-info</i></div>
<div><i>running install_scripts</i></div>
<div>--</div>
If I run the python console from the source directory I'm not able to run the tests mentioned in the installation guidelines, but numpy is fine (linking to
<b>Michiel</b> comment):</div>
<div><br clear="none">
</div>
<div>--</div>
<div>
<div><i>(biopython) gasta@gasta-VirtualBox:~/Documents/GitHub/biopython(master)$ python</i></div>
<div><i>Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34) </i></div>
<div><i>[GCC 7.3.0] on linux2</i></div>
<div><i>Type "help", "copyright", "credits" or "license" for more information.</i></div>
<div><i>>>> from Bio import Seq</i></div>
<div><i>>>> from Bio.Alphabet.IUPAC import unambiguous_dna</i></div>
<div><i>>>> new_seq = Seq('GATCAGAAG', unambiguous_dna)</i></div>
<div><i>Traceback (most recent call last):</i></div>
<div><i> File "<stdin>", line 1, in <module></i></div>
<div><i>TypeError: 'module' object is not callable</i></div>
<div><i><span style="font-size:12pt;">>>> import numpy</span><br clear="none">
</i></div>
<div><i>>>> numpy.array([[1, 2], [3, 4]])</i></div>
<div><i>array([[1, 2],</i></div>
<div><i> [3, 4]])</i></div>
<div> --</div>
<div><br clear="none">
</div>
<div>Same happen when I run the exact same test elsewhere but still inside the virtual environment</div>
<div><br clear="none">
</div>
<div>--</div>
<div>
<div><i>(biopython) gasta@gasta-VirtualBox:~$ python</i></div>
<div><i>Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34) </i></div>
<div><i>[GCC 7.3.0] on linux2</i></div>
<div><i>Type "help", "copyright", "credits" or "license" for more information.</i></div>
<div><i>>>> import numpy</i></div>
<div></div>
<div><i>>>> numpy.array([[1, 2], [3, 4]])</i></div>
<div><i>array([[1, 2],</i></div>
<div><i> [3, 4]])<span style="font-size:12pt;"> </span></i></div>
<div><i>>>> from Bio import Seq</i></div>
<div><i>>>> from Bio.Alphabet.IUPAC import unambiguous_dna</i></div>
<div><i>>>> new_seq = Seq('GATCAGAAG', unambiguous_dna)</i></div>
<div><i>Traceback (most recent call last):</i></div>
<div><i> File "<stdin>", line 1, in <module></i></div>
<div><i>TypeError: 'module' object is not callable</i></div>
</div>
<div>--</div>
<div><br clear="none">
</div>
<div>Francesco</div>
<div><br clear="none">
</div>
<br clear="none">
</div>
</div>
<hr style="display:inline-block;width:98%;" tabindex="-1">
<div class="yiv2129460908yqt5103318410" id="yiv2129460908yqt54419"><div dir="ltr" id="yiv2129460908divRplyFwdMsg"><font style="font-size:11pt;" face="Calibri, sans-serif" color="#000000"><b>From:</b> Michiel de Hoon <mjldehoon@yahoo.com><br clear="none">
<b>Sent:</b> 27 June 2018 04:11:05<br clear="none">
<b>To:</b> Francesco Gastaldello (Staff); p.j.a.cock@googlemail.com; Fulton, Ben<br clear="none">
<b>Cc:</b> biopython@mailman.open-bio.org<br clear="none">
<b>Subject:</b> Re: [Biopython] problem with Bio.Align _aligns.c</font>
<div> </div>
</div></div>
</div><div class="yiv2129460908yqt5103318410" id="yiv2129460908yqt64759"><div><div>
<div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:10px;">
<div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:10px;">
<div></div>
<div>Francesco, in which directory are you running Python?</div>
<div>I can replicate this error only if I try these commands in the biopython source directory. In that case, python imports from the current directory, not from the installed directory.</div>
<div>Importing Bio.Cluster will also fail for the same reason.</div>
<div>Numpy has the same problem; there they show an informative error message if somebody tries to import numpy from the source tree:</div>
<div><br clear="none">
</div>
<div><span>>>> from numpy import *<br clear="none">
Traceback (most recent call last):<br clear="none">
File "<stdin>", line 1, in <module><br clear="none">
File "numpy/__init__.py", line 131, in <module><br clear="none">
raise ImportError(msg)<br clear="none">
ImportError: Error importing numpy: you should not try to import numpy from<br clear="none">
its source directory; please exit the numpy source tree, and relaunch<br clear="none">
your python interpreter from there.<br clear="none">
</span><span></span>
<div><br clear="none">
</div>
<div><br clear="none">
</div>
<div>-Michiel<br clear="none">
</div>
</div>
<div><br clear="none">
</div>
</div>
<div class="yiv2129460908x_yahoo_quoted" id="yiv2129460908x_yahoo_quoted_0235812742">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>On Wednesday, June 27, 2018, 6:38:02 AM GMT+9, Fulton, Ben <befulton@iu.edu> wrote:
</div>
<div><br clear="none">
</div>
<div><br clear="none">
</div>
<div>
<div id="yiv2129460908x_yiv8000510501"><style>
#yiv2129460908 #yiv2129460908 --
#yiv2129460908x_yiv8000510501 #yiv2129460908x_yiv8000510501 -- filtered #yiv2129460908x_yiv8000510501
{}
#yiv2129460908 filtered #yiv2129460908x_yiv8000510501
{font-family:Calibri;}
#yiv2129460908 #yiv2129460908x_yiv8000510501 #yiv2129460908x_yiv8000510501 p.yiv2129460908x_yiv8000510501MsoNormal, #yiv2129460908 #yiv2129460908x_yiv8000510501 li.yiv2129460908x_yiv8000510501MsoNormal, #yiv2129460908 #yiv2129460908x_yiv8000510501 div.yiv2129460908x_yiv8000510501MsoNormal
{margin:0in;margin-bottom:.0001pt;font-size:11.0pt;font-family:sans-serif;}
#yiv2129460908 #yiv2129460908x_yiv8000510501 a:x_link, #yiv2129460908 #yiv2129460908x_yiv8000510501 span.yiv2129460908x_yiv8000510501MsoHyperlink
{color:blue;text-decoration:underline;}
#yiv2129460908 #yiv2129460908x_yiv8000510501 a:x_visited, #yiv2129460908 #yiv2129460908x_yiv8000510501 span.yiv2129460908x_yiv8000510501MsoHyperlinkFollowed
{color:purple;text-decoration:underline;}
#yiv2129460908 #yiv2129460908x_yiv8000510501 p.yiv2129460908x_yiv8000510501msonormal0, #yiv2129460908 #yiv2129460908x_yiv8000510501 li.yiv2129460908x_yiv8000510501msonormal0, #yiv2129460908 #yiv2129460908x_yiv8000510501 div.yiv2129460908x_yiv8000510501msonormal0
{margin:0in;margin-bottom:.0001pt;font-size:11.0pt;font-family:sans-serif;}
#yiv2129460908 #yiv2129460908x_yiv8000510501 span.yiv2129460908x_yiv8000510501EmailStyle20
{font-family:sans-serif;color:windowtext;}
#yiv2129460908 #yiv2129460908x_yiv8000510501 .yiv2129460908x_yiv8000510501MsoChpDefault
{font-size:10.0pt;}
#yiv2129460908 filtered #yiv2129460908x_yiv8000510501
{margin:1.0in 1.0in 1.0in 1.0in;}
#yiv2129460908
</style>
<div>
<div class="yiv2129460908x_yiv8000510501WordSection1">
<p class="yiv2129460908x_yiv8000510501MsoNormal">Wouldn’t you have to run “python setup.py install” to get the libraries into the correct locations?</p>
<p class="yiv2129460908x_yiv8000510501MsoNormal"> </p>
<div>
<p class="yiv2129460908x_yiv8000510501MsoNormal"><span style="color:#1F497D;">--</span></p>
<p class="yiv2129460908x_yiv8000510501MsoNormal"><span style="color:#1F497D;">Ben Fulton</span></p>
<p class="yiv2129460908x_yiv8000510501MsoNormal"><span style="color:#1F497D;">Research Technologies</span></p>
<p class="yiv2129460908x_yiv8000510501MsoNormal"><span style="color:#1F497D;">Scientific Applications and Performance Tuning</span></p>
<p class="yiv2129460908x_yiv8000510501MsoNormal"><span style="color:#1F497D;">Indiana University</span></p>
<p class="yiv2129460908x_yiv8000510501MsoNormal"><span style="color:#1F497D;">E-Mail: </span><a rel="nofollow" shape="rect" ymailto="mailto:befulton@iu.edu" target="_blank" href="mailto:befulton@iu.edu"><span style="color:#0563C1;">befulton@iu.edu</span></a><span style="color:#1F497D;"></span></p>
</div>
<p class="yiv2129460908x_yiv8000510501MsoNormal"> </p>
<div class="yiv2129460908x_yiv8000510501yqt2137137129" id="yiv2129460908x_yiv8000510501yqt84426">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in;">
<p class="yiv2129460908x_yiv8000510501MsoNormal"><b>From:</b> Biopython <biopython-bounces+befulton=iu.edu@mailman.open-bio.org>
<b>On Behalf Of </b>Francesco Gastaldello (Staff)<br clear="none">
<b>Sent:</b> Tuesday, June 26, 2018 10:36 AM<br clear="none">
<b>To:</b> p.j.a.cock@googlemail.com<br clear="none">
<b>Cc:</b> biopython@mailman.open-bio.org<br clear="none">
<b>Subject:</b> Re: [Biopython] problem with Bio.Align _aligns.c</p>
</div>
</div>
<p class="yiv2129460908x_yiv8000510501MsoNormal"> </p>
<div id="yiv2129460908x_yiv8000510501divtagdefaultwrapper">
<p><span style="font-size:12.0pt;color:black;">I'm running the test via Pycharm and it is connected to my origin and upstream branches on GitHub.</span></p>
<p><span style="font-size:12.0pt;color:black;"> </span></p>
<p><span style="font-size:12.0pt;color:black;">I've done a quick test of the other modules that use C and I can confirm that the same problem is visible.<br clear="none">
<br clear="none">
I've run some tests even on the master branch, which I consider to be stable environment.</span></p>
<p><span style="font-size:12.0pt;color:black;"> </span></p>
<p><span style="font-size:12.0pt;color:black;">Francesco </span></p>
</div>
<div class="yiv2129460908x_yiv8000510501MsoNormal" style="text-align:center;" align="center">
<hr width="98%" size="3" align="center">
</div>
<div id="yiv2129460908x_yiv8000510501divRplyFwdMsg">
<p class="yiv2129460908x_yiv8000510501MsoNormal"><b><span style="color:black;">From:</span></b><span style="color:black;"> Peter Cock <<a rel="nofollow" shape="rect" ymailto="mailto:p.j.a.cock@googlemail.com" target="_blank" href="mailto:p.j.a.cock@googlemail.com">p.j.a.cock@googlemail.com</a>><br clear="none">
<b>Sent:</b> 26 June 2018 15:29:39<br clear="none">
<b>To:</b> Francesco Gastaldello (Staff)<br clear="none">
<b>Cc:</b> <a rel="nofollow" shape="rect" ymailto="mailto:biopython@mailman.open-bio.org" target="_blank" href="mailto:biopython@mailman.open-bio.org">
biopython@mailman.open-bio.org</a><br clear="none">
<b>Subject:</b> Re: [Biopython] problem with Bio.Align _aligns.c</span> </p>
<div>
<p class="yiv2129460908x_yiv8000510501MsoNormal"> </p>
</div>
</div>
<div>
<div>
<p class="yiv2129460908x_yiv8000510501MsoNormal">You must be running from Git, perhaps even the<br clear="none">
provisional tag for Biopython 1.72?<br clear="none">
<br clear="none">
The error is worryingly similar to what I am getting<br clear="none">
with the automated wheels for Linux and macOS<br clear="none">
under TravisCI - they seem to build fine, but when<br clear="none">
running the tests, the compiled code can't be found.<br clear="none">
<br clear="none">
This is holding up the Biopython 1.72 release, see also:<br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://mailman.open-bio.org/pipermail/biopython/2018-June/016474.html">http://mailman.open-bio.org/pipermail/biopython/2018-June/016474.html</a><br clear="none">
<br clear="none">
Do you see this with other C code as well, e.g.<br clear="none">
Bio.Cluster, or cpairwise2, or KDTree?<br clear="none">
<br clear="none">
Perhaps this is a problem with the current code in<br clear="none">
GitHub, not just something strange with the multi-<br clear="none">
wheel setup as I had been assuming?<br clear="none">
<br clear="none">
Peter<br clear="none">
<br clear="none">
On Tue, Jun 26, 2018 at 12:26 PM, Francesco Gastaldello (Staff)<br clear="none">
<<a rel="nofollow" shape="rect" ymailto="mailto:f.gastaldello@dundee.ac.uk" target="_blank" href="mailto:f.gastaldello@dundee.ac.uk">f.gastaldello@dundee.ac.uk</a>> wrote:<br clear="none">
> Hi all,<br clear="none">
><br clear="none">
><br clear="none">
> I have a virtual environment with python 2.7.15rc1 and I get this error when<br clear="none">
> I run some commands:<br clear="none">
><br clear="none">
><br clear="none">
> ////<br clear="none">
><br clear="none">
> Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34)<br clear="none">
> [GCC 7.3.0] on linux2<br clear="none">
> Type "help", "copyright", "credits" or "license" for more information.<br clear="none">
>>>> from Bio import SeqIO<br clear="none">
> Traceback (most recent call last):<br clear="none">
> File "<stdin>", line 1, in <module><br clear="none">
> File "Bio/SeqIO/__init__.py", line 375, in <module><br clear="none">
> from Bio.Align import MultipleSeqAlignment<br clear="none">
> File "Bio/Align/__init__.py", line 22, in <module><br clear="none">
> from Bio.Align import _aligners<br clear="none">
> ImportError: cannot import name _aligners<br clear="none">
><br clear="none">
> ////<br clear="none">
><br clear="none">
><br clear="none">
> I've made sure to run "python setup.py build" before trying anything but<br clear="none">
> that did not solve the problem.<br clear="none">
><br clear="none">
> I'm on Ububtu 18.04 on a virtual machine.<br clear="none">
><br clear="none">
><br clear="none">
> Thanks,<br clear="none">
><br clear="none">
> Francesco<br clear="none">
><br clear="none">
><br clear="none">
> The University of Dundee is a registered Scottish Charity, No: SC015096<br clear="none">
><br clear="none">
> _______________________________________________<br clear="none">
> Biopython mailing list - <a rel="nofollow" shape="rect" ymailto="mailto:Biopython@mailman.open-bio.org" target="_blank" href="mailto:Biopython@mailman.open-bio.org">
Biopython@mailman.open-bio.org</a><br clear="none">
> <a rel="nofollow" shape="rect" target="_blank" href="http://mailman.open-bio.org/mailman/listinfo/biopython">
http://mailman.open-bio.org/mailman/listinfo/biopython</a></p>
</div>
</div>
<p class="yiv2129460908x_yiv8000510501MsoNormal"><br clear="none">
<span style="font-size:10.0pt;">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
</p>
</div>
</div>
</div>
</div>
<div class="yiv2129460908x_yqt2137137129" id="yiv2129460908x_yqt90376">_______________________________________________<br clear="none">
Biopython mailing list - <a rel="nofollow" shape="rect" ymailto="mailto:Biopython@mailman.open-bio.org" target="_blank" href="mailto:Biopython@mailman.open-bio.org">
Biopython@mailman.open-bio.org</a><br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://mailman.open-bio.org/mailman/listinfo/biopython">http://mailman.open-bio.org/mailman/listinfo/biopython</a></div>
</div>
</div>
</div>
</div>
</div>
<br clear="none">
<span style="font-size:10pt;">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
</div></div></div></div>
</div>
</div></div></body></html>