<div dir="ltr"><div>Michiel and Markus:<br></div><div><br>Yes, that's exactly it
according to the instructions on the github page you are actually
supposed to run everything from the source tree: <a href="https://github.com/biopython/biopython" target="_blank">https://github.com/biopython/biopython</a></div><div>---------------------------------------------------------------------------------------------------------------<br></div><div><p dir="auto">Then either download and decompress our source code, or fetch it using git.
Now change directory to the Biopython source code folder and run:</p>
<pre>python setup.py build
python setup.py test
sudo python setup.py install
</pre></div><div>---------------------------------------------------------------------------------------------------------------<br></div><div>I guess these instructions should be changed to:<br><br></div><div>$ python setup.py build<br></div><div>$ sudo python setup.py install</div><div>$cd Tests</div><div>$ python run_tests.py [--offline]</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 20, 2022 at 2:17 AM Markus Piotrowski <<a href="mailto:Markus.Piotrowski@ruhr-uni-bochum.de">Markus.Piotrowski@ruhr-uni-bochum.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
Dear Iddo,<br>
<br>
After reading here: <br>
<br>
<a href="https://docs.python.org/3/install/" target="_blank">https://docs.python.org/3/install/</a><br>
<br>
I would assume that your built Biopython stuff is in a "build"
subfolder (including the C extensions), but you are running the
test from the source folder (biopython-master). Could this be?<br>
<br>
Best<br>
Markus<br>
<br>
<br>
<br>
<div>Am 20.10.2022 um 08:41 schrieb Markus
Piotrowski:<br>
</div>
<blockquote type="cite">
This may be a naive question, since I'm not very familiar with
installing from source, but does "build" compile the C extensions
or is this something that happens during "install"? In the first
case you would be missing the compiled C-extension, leading to the
described import error.<br>
<br>
Best<br>
Markus<br>
<br>
<div>Am 20.10.2022 um 01:58 schrieb Iddo
Friedberg:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="auto">Hi,
<div dir="auto"><br>
</div>
<div>Thank you for your answer, Michiel.</div>
<div><br>
</div>
<div dir="auto">So I'm confused as to what I am doing wrong.
I downloaded the zip , unzipped, changed to the
biopython-master directory, and ran <br>
</div>
<div dir="auto">
<pre>python setup.py build
(this seems to be concluding fine)
python setup.py test
And the first error line (of many) is:
/home/idoerg/Downloads/biopython-master/Bio/__init__.py:138: BiopythonWarning: You may be importing Biopython from inside the source tree.
This is bad practice and might lead to downstream issues. In particular, you might encounter ImportErrors due to missing compiled C extensions.
We recommend that you try running your code from outside the source tree.
If you are outside the source tree then you have a setup.py file in an unexpected directory: /home/idoerg/Downloads/biopython-master</pre>
</div>
<div>Thanks,</div>
<div><br>
</div>
<div>Iddo</div>
<div><br>
</div>
<div dir="auto">
<div dir="auto">--<br>
Sent from a machine that promotes typos</div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Oct 19, 2022, 17:15
Michiel de Hoon <<a href="mailto:mjldehoon@yahoo.com" target="_blank">mjldehoon@yahoo.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:10px">
<div dir="ltr">Hi Iddo,</div>
<div dir="ltr"><br>
</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">> The first error "<span style="font-family:monospace">BiopythonWarning: You
may be importing Biopython from inside the source
tree."<span style="font-family:arial,sans-serif"> </span></span><br>
<span style="font-family:monospace"><span style="font-family:arial,sans-serif"></span></span>
<div><span style="font-family:monospace"><span style="font-family:arial,sans-serif">> Is
that something I can ignore, <br>
</span></span></div>
<div><span style="font-family:monospace"><span style="font-family:arial,sans-serif"><br>
</span></span></div>
<div dir="ltr"><span style="font-family:monospace"><span style="font-family:arial,sans-serif">No; it is
causing the import error.</span></span></div>
<div dir="ltr"><span style="font-family:monospace"><span style="font-family:arial,sans-serif"><br>
</span></span></div>
<div dir="ltr"><span style="font-family:monospace"><span style="font-family:arial,sans-serif">Best,</span></span></div>
<div dir="ltr"><span style="font-family:monospace"><span style="font-family:arial,sans-serif">-Michiel<br>
</span></span></div>
<div><br>
</div>
</div>
</div>
<div id="m_-3549589194068843503m_5327145556957949328m_666267887992158593yahoo_quoted_7204585151">
<div>
<div> On Thursday, October 20, 2022 at 01:43:28 AM
GMT+9, Iddo Friedberg <<a href="mailto:idoerg@gmail.com" rel="noreferrer" target="_blank">idoerg@gmail.com</a>>
wrote: </div>
<div><br>
</div>
<div><br>
</div>
<div>
<div id="m_-3549589194068843503m_5327145556957949328m_666267887992158593yiv3039875215">
<div dir="ltr">
<div>Hi,</div>
<div><br>
</div>
<div>I'm trying to install biopython from
source, since release 1.79 does not work with
the newest Swissprot FT records. Looking at
the source of SwissProt/__init__.py in github
this issue seems to be fixed and hopefully
release 1.80 this will work again. <br>
<br>
</div>
<div>However, I am encountering the following
problem when trying to test:<br>
</div>
<div><br>
</div>
<div><br>
</div>
<span style="font-family:monospace">idoerg@IddoWS:~/soft/biopython$
python setup.py test<br>
running test<br>
Python version: 3.7.5 (default, Dec 9 2021,
17:04:37) <br>
[GCC 8.4.0]<br>
Operating system: posix linux<br>
/home/idoerg/soft/biopython/Bio/__init__.py:146: BiopythonWarning: You
may be importing Biopython from inside the
source tree. This is bad practice and might
lead to downstream issues. In particular, you
might encounter ImportErrors due to missing
compiled C extensions. We recommend that you
try running your code from outside the source
tree. If you are outside the source tree then
you have a setup.py file in an unexpected
directory: /home/idoerg/soft/biopython<br>
BiopythonWarning,<br>
test_Ace ... ok<br>
test_Affy ... ok<br>
test_AlignIO ... loading tests failed:<br>
Failed to import test module: test_AlignIO<br>
Traceback (most recent call last):<br>
File
"/usr/lib/python3.7/unittest/loader.py", line
154, in loadTestsFromName<br>
module = __import__(module_name)<br>
File
"/home/idoerg/soft/biopython/Tests/test_AlignIO.py",
line 11, in <module><br>
from Bio import AlignIO<br>
File
"/home/idoerg/soft/biopython/Bio/AlignIO/__init__.py",
line 140, in <module><br>
from Bio.Align import MultipleSeqAlignment<br>
File
"/home/idoerg/soft/biopython/Bio/Align/__init__.py",
line 34, in <module><br>
from Bio.Align import _aligners<br>
ImportError: cannot import name '_aligners'
from 'Bio.Align'
(/home/idoerg/soft/biopython/Bio/Align/__init__.py)</span><br>
<div><br>
</div>
<div>Previous iterations of the "_aligners"
import error error in the biopython github
were attributed to conflicting python
versions. This may be the case here, but
before I kill all my anaconda stuff, I just
wanted to make sure that I'm actually running
the test correctly. The first error "<span style="font-family:monospace">BiopythonWarning:
You may be importing Biopython from inside
the source tree."<span style="font-family:arial,sans-serif"> <br>
</span></span></div>
<div><span style="font-family:monospace"><span style="font-family:arial,sans-serif"><br>
</span></span></div>
<div><span style="font-family:monospace"><span style="font-family:arial,sans-serif">Is
that something I can ignore, or am I doing
yet another thing wrong?</span></span></div>
<div><span style="font-family:monospace"><br>
</span></div>
<div><span style="font-family:monospace">Thanks,</span></div>
<div><span style="font-family:monospace"><br>
</span></div>
<div><span style="font-family:monospace">Iddo<br>
</span> </div>
<br>
-- <br>
<div dir="ltr">
<div dir="ltr">
<div>Iddo Friedberg</div>
<div><a rel="nofollow noopener noreferrer
noreferrer" href="http://iddo-friedberg.net/contact.html" target="_blank">http://iddo-friedberg.net/contact.html</a><br>
++++++++++[>+++>++++++>++++++++>++++++++++>+++++++++++<<<<<-]>>>>++++.><br>
++++++..----.<<<<++++++++++++++++++++++++++++.-----------..>>>+.-----.<br>
.>-.<<<<--.>>>++.>+++.<+++.----.-.<++++++++++++++++++.>+.>.<++.<<<+.>><br>
>>----.<--.>++++++.<<<<------------------------------------.<br>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br>
Biopython mailing list - <a href="mailto:Biopython@biopython.org" rel="noreferrer" target="_blank">Biopython@biopython.org</a><br>
<a href="https://mailman.open-bio.org/mailman/listinfo/biopython" rel="noreferrer" target="_blank">https://mailman.open-bio.org/mailman/listinfo/biopython</a><br>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
Biopython mailing list - <a href="mailto:Biopython@biopython.org" target="_blank">Biopython@biopython.org</a>
<a href="https://mailman.open-bio.org/mailman/listinfo/biopython" target="_blank">https://mailman.open-bio.org/mailman/listinfo/biopython</a>
</pre>
</blockquote>
<br>
<pre cols="72">--
_________________________________
Dr. Markus Piotrowski
Privatdozent/Akademischer Rat
Lehrstuhl für Molekulargenetik und Physiologie der Pflanzen
ND 3/49
Universitätsstr. 150
44801 Bochum
Tel. xx49-(0)234-3224290
Fax. xx49-(0)234-3214187
<a href="https://www.ruhr-uni-bochum.de/pflaphy/Seiten_dt/Piotrowski_d.html" target="_blank">https://www.ruhr-uni-bochum.de/pflaphy/Seiten_dt/Piotrowski_d.html</a>
<a href="http://homepage.ruhr-uni-bochum.de/Markus.Piotrowski/Index.html" target="_blank">http://homepage.ruhr-uni-bochum.de/Markus.Piotrowski/Index.html</a></pre>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
Biopython mailing list - <a href="mailto:Biopython@biopython.org" target="_blank">Biopython@biopython.org</a>
<a href="https://mailman.open-bio.org/mailman/listinfo/biopython" target="_blank">https://mailman.open-bio.org/mailman/listinfo/biopython</a>
</pre>
</blockquote>
<br>
<pre cols="72">--
_________________________________
Dr. Markus Piotrowski
Privatdozent/Akademischer Rat
Lehrstuhl für Molekulargenetik und Physiologie der Pflanzen
ND 3/49
Universitätsstr. 150
44801 Bochum
Tel. xx49-(0)234-3224290
Fax. xx49-(0)234-3214187
<a href="https://www.ruhr-uni-bochum.de/pflaphy/Seiten_dt/Piotrowski_d.html" target="_blank">https://www.ruhr-uni-bochum.de/pflaphy/Seiten_dt/Piotrowski_d.html</a>
<a href="http://homepage.ruhr-uni-bochum.de/Markus.Piotrowski/Index.html" target="_blank">http://homepage.ruhr-uni-bochum.de/Markus.Piotrowski/Index.html</a></pre>
</div>
_______________________________________________<br>
Biopython mailing list - <a href="mailto:Biopython@biopython.org" target="_blank">Biopython@biopython.org</a><br>
<a href="https://mailman.open-bio.org/mailman/listinfo/biopython" rel="noreferrer" target="_blank">https://mailman.open-bio.org/mailman/listinfo/biopython</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Iddo Friedberg</div><div><a href="http://iddo-friedberg.net/contact.html" target="_blank">http://iddo-friedberg.net/contact.html</a><br>++++++++++[>+++>++++++>++++++++>++++++++++>+++++++++++<<<<<-]>>>>++++.><br>++++++..----.<<<<++++++++++++++++++++++++++++.-----------..>>>+.-----.<br>.>-.<<<<--.>>>++.>+++.<+++.----.-.<++++++++++++++++++.>+.>.<++.<<<+.>><br>>>----.<--.>++++++.<<<<------------------------------------.<br></div></div></div>