<html><head></head><body><div class="ydpf470d6b3yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:10px;"><div></div>
        <div dir="ltr" data-setdir="false"><div>Usually I go to biopython/Tests, and run "python run_tests.py --offline" from there.</div><div dir="ltr" data-setdir="false">But you're right, "python setup.py test" should not run at all if it is not supposed to work.</div><div dir="ltr" data-setdir="false">The docstring in setup.py says</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false"><div>    """Run all of the tests for the package.<br><br>    This is a automatic test run class to make distutils kind of act like<br>    perl. With this you can do:<br><br>    python setup.py build<br>    python setup.py install<br>    python setup.py test<br><br>    """<br><br></div><div dir="ltr" data-setdir="false">which is clearly wrong.</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">Perhaps we should change our file layout in the biopython distribution, and have all code under a src subdirectory or something</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">Best,</div><div dir="ltr" data-setdir="false">-Michiel<br></div></div><div><br></div><div><br></div></div><div><br></div>
        
        </div><div id="yahoo_quoted_6640254087" class="yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Thursday, October 20, 2022 at 08:58:36 AM GMT+9, Iddo Friedberg <idoerg@gmail.com> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="yiv6906824927"><div><div dir="ltr"><div>Hi,<div><br clear="none"></div><div>Thank you for your answer, Michiel.</div><div><br clear="none"></div><div>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 clear="none"></div><div><pre>python setup.py build<br clear="none">(this seems to be concluding fine)<br clear="none">
python setup.py test<br clear="none"><br clear="none">And the first error line (of many) is:<br clear="none">/home/idoerg/Downloads/biopython-master/Bio/__init__.py:138: BiopythonWarning: You may be importing Biopython from inside the source tree. <br clear="none">This is bad practice and might lead to downstream issues. In particular, you might encounter ImportErrors due to missing compiled C extensions.<br clear="none">We recommend that you try running your code from outside the source tree. <br clear="none">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 clear="none"></div><div>Iddo</div><div><br clear="none"></div><div><div>--<br clear="none">Sent from a machine that promotes typos</div></div></div></div><br clear="none"><div id="yiv6906824927yqt03223" class="yiv6906824927yqt2174255329"><div class="yiv6906824927gmail_quote"><div dir="ltr" class="yiv6906824927gmail_attr">On Wed, Oct 19, 2022, 17:15 Michiel de Hoon <<a rel="nofollow noopener noreferrer" shape="rect" ymailto="mailto:mjldehoon@yahoo.com" target="_blank" href="mailto:mjldehoon@yahoo.com">mjldehoon@yahoo.com</a>> wrote:<br clear="none"></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;" class="yiv6906824927gmail_quote"><div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:10px;"><div></div>
        <div dir="ltr">Hi Iddo,</div><div dir="ltr"><br clear="none"></div><div dir="ltr"><br clear="none"></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 clear="none"><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 clear="none"></span></span></div><div><span style="font-family:monospace;"><span style="font-family:arial, sans-serif;"><br clear="none"></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 clear="none"></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 clear="none"></span></span></div><div><br clear="none"></div></div>
        
        </div><div id="yiv6906824927m_5327145556957949328m_666267887992158593yahoo_quoted_7204585151">
            <div style="font-family:Helvetica, Arial, sans-serif;font-size:13px;color:rgb(38,40,42);">
                
                <div>
                    On Thursday, October 20, 2022 at 01:43:28 AM GMT+9, Iddo Friedberg <<a rel="nofollow noopener noreferrer" shape="rect" ymailto="mailto:idoerg@gmail.com" target="_blank" href="mailto:idoerg@gmail.com">idoerg@gmail.com</a>> wrote:
                </div>
                <div><br clear="none"></div>
                <div><br clear="none"></div>
                <div><div id="yiv6906824927m_5327145556957949328m_666267887992158593yiv3039875215"><div dir="ltr"><div>Hi,</div><div><br clear="none"></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 clear="none"><br clear="none"></div><div>However, I am encountering the following problem when trying to test:<br clear="none"></div><div><br clear="none"></div><div><br clear="none"></div><span style="font-family:monospace;">idoerg@IddoWS:~/soft/biopython$ python setup.py test<br clear="none">running test<br clear="none">Python version: 3.7.5 (default, Dec  9 2021, 17:04:37) <br clear="none">[GCC 8.4.0]<br clear="none">Operating system: posix linux<br clear="none">/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 clear="none">  BiopythonWarning,<br clear="none">test_Ace ... ok<br clear="none">test_Affy ... ok<br clear="none">test_AlignIO ... loading tests failed:<br clear="none">Failed to import test module: test_AlignIO<br clear="none">Traceback (most recent call last):<br clear="none">  File "/usr/lib/python3.7/unittest/loader.py", line 154, in loadTestsFromName<br clear="none">    module = __import__(module_name)<br clear="none">  File "/home/idoerg/soft/biopython/Tests/test_AlignIO.py", line 11, in <module><br clear="none">    from Bio import AlignIO<br clear="none">  File "/home/idoerg/soft/biopython/Bio/AlignIO/__init__.py", line 140, in <module><br clear="none">    from Bio.Align import MultipleSeqAlignment<br clear="none">  File "/home/idoerg/soft/biopython/Bio/Align/__init__.py", line 34, in <module><br clear="none">    from Bio.Align import _aligners<br clear="none">ImportError: cannot import name '_aligners' from 'Bio.Align' (/home/idoerg/soft/biopython/Bio/Align/__init__.py)</span><br clear="none"><div><br clear="none"></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 clear="none"></span></span></div><div><span style="font-family:monospace;"><span style="font-family:arial, sans-serif;"><br clear="none"></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 clear="none"></span></div><div><span style="font-family:monospace;">Thanks,</span></div><div><span style="font-family:monospace;"><br clear="none"></span></div><div><span style="font-family:monospace;">Iddo<br clear="none"></span> </div><br clear="none">-- <br clear="none"><div dir="ltr"><div dir="ltr"><div>Iddo Friedberg</div><div><a rel="nofollow noopener noreferrer" shape="rect" target="_blank" href="http://iddo-friedberg.net/contact.html">http://iddo-friedberg.net/contact.html</a><br clear="none">++++++++++[>+++>++++++>++++++++>++++++++++>+++++++++++<<<<<-]>>>>++++.><br clear="none">++++++..----.<<<<++++++++++++++++++++++++++++.-----------..>>>+.-----.<br clear="none">.>-.<<<<--.>>>++.>+++.<+++.----.-.<++++++++++++++++++.>+.>.<++.<<<+.>><br clear="none">>>----.<--.>++++++.<<<<------------------------------------.<br clear="none"></div></div></div></div>
</div>_______________________________________________<br clear="none">Biopython mailing list  -  <a rel="nofollow noopener noreferrer" shape="rect" ymailto="mailto:Biopython@biopython.org" target="_blank" href="mailto:Biopython@biopython.org">Biopython@biopython.org</a><br clear="none"><a rel="nofollow noopener noreferrer" shape="rect" target="_blank" href="https://mailman.open-bio.org/mailman/listinfo/biopython">https://mailman.open-bio.org/mailman/listinfo/biopython</a><br clear="none"></div>
            </div>
        </div></div></blockquote></div></div>
</div></div></div>
            </div>
        </div></body></html>