[AMBER] 答复: [ambermd.org代发]Re: 答复: [ambermd.org代发]Re: "No module named pytraj" during make test step

From: 石谷沁 <guqin.shi.qilu-pharma.com>
Date: Fri, 16 Apr 2021 06:27:01 +0000

Hi Hai,

I would like to inform you that I followed your suggestion here for pdb4amber and it worked!!

===========================
export PYTHONPATH=$PYTHONPATH:$AMBERHOME/lib/python3.8/site-packages/pdb4amber-1.7.dev0-py3.8.egg/
and try "pdb4amber -h" again.

I have no clue how to fix it yet. But adding $AMBERHOME/lib/python3.8/site-packages/pdb4amber-1.7.dev0-py3.8.egg/ to your PYTHONPATH will
resolve the problem.`
===========================

I added pytraj's egg path to PYTHONPATH:
export PYTHONPATH=$PYTHONPATH:$AMBERHOME/lib/python3.8/site-packages/pytraj-2.0.5-py3.8-linux-x86_64.egg/

The pytraj test then PASSED.

Not sure what's the reason...somehow python failed to find pytraj although the path is already indicated...
Thank you for the info. Hope it will be fixed in future updates.. My solution can also serve as example for others running into similar problems.


Best,
Guqin


[gqshi.localhost pytraj]$ make
Testing serial pytraj
/home/gqshi/amber20//miniconda/bin/python test.py
<module 'pytraj' from '/home/gqshi/amber20/lib/python3.8/site-packages/pytraj-2.0.5-py3.8-linux-x86_64.egg/pytraj/__init__.py'>
PASSED
================================= test session starts ================================================================================
platform linux -- Python 3.8.5, pytest-6.2.3, py-1.10.0, pluggy-0.13.1 -- /home/gqshi/amber20//miniconda/bin/python
cachedir: .pytest_cache
rootdir: /home/gqshi/amber20/AmberTools
collected 9 items

../../src/pytraj/tests/test_energy/test_sander_energies.py::TestSander::test_GB PASSED [ 11%]
../../src/pytraj/tests/test_energy/test_sander_energies.py::TestSander::test_GB_QMMM PASSED [ 22%]
../../src/pytraj/tests/test_energy/test_sander_energies.py::TestSander::test_PME PASSED [ 33%]
../../src/pytraj/tests/test_energy/test_sander_energies.py::TestSander::test_PME_QMMM PASSED [ 44%]
../../src/pytraj/tests/test_energy/test_sander_energies.py::TestSander::test_PME_with_energy_decompositionr PASSED [ 55%]
../../src/pytraj/tests/test_energy/test_sander_energies.py::TestSander::test_frame_indices PASSED [ 66%]
../../src/pytraj/tests/test_energy/test_sander_energies.py::TestSander::test_gbneck2nu PASSED [ 77%]
../../src/pytraj/tests/test_energy/test_sander_energies.py::TestSander::test_mm_options_as_string PASSED [ 88%]
../../src/pytraj/tests/test_energy/test_sander_energies.py::TestSander::test_qm_options_as_string PASSED [100%]

==================================== 9 passed in 5.32s =========================================================================







-----邮件原件-----
发件人: Hai Nguyen [mailto:nhai.qn.gmail.com]
发送时间: 2021年4月16日 12:40
收件人: AMBER Mailing List <amber.ambermd.org>
主题: [ambermd.org代发]Re: [AMBER] 答复: [ambermd.org代发]Re: "No module named pytraj" during make test step

On Thu, Apr 15, 2021 at 11:25 PM 石谷沁 <guqin.shi.qilu-pharma.com> wrote:

> Hi David, thanks for the reply.
>
> > If you try a fresh install of AmberTools20 using cmake, I think you
> should get a functioning pytraj.
>
> With cmake instead of cmake3 on CentOS 7 for AmberTools20? I am trying
> to clarify if the key is re-installing AmberTool20 or the key is
> re-building
> AmberTool20 separately with cmake...
>
>
>
> > (Of course, if you are not planning to use pytraj, you can ignore
> > the
> > failure....)
>
>


> I used to use cpptraj a lot...not sure if it utilizes the function of
> pytraj....
>
>
pytraj is actually a python version of cpptraj (using libcpptraj under the hood). So don't worry about pytraj if you don't use Python.

Your installation procedure seems fine to me, and I don't have any clue "why". Final shot: what's your setuptools version in miniconda?

$AMBERHOME/miniconda/bin/python -c 'import setuptools as s; print(s.__version__)'


I do see the issue of pytraj with python 3.8 and a relatively new setuptools version:

https://github.com/Amber-MD/pdb4amber/issues/85


The above issue is for pdb4amber but you can try similar thing with pytraj:

https://github.com/Amber-MD/pdb4amber/issues/85#issuecomment-723529395


I am sorry for the trouble without any clear solution.
Hai


>
> Thanks,
> Guqin
>
> -----邮件原件-----
> 发件人: David A Case [mailto:david.case.rutgers.edu]
> 发送时间: 2021年4月15日 20:23
> 收件人: AMBER Mailing List <amber.ambermd.org>
> 主题: [ambermd.org代发]Re: [AMBER] "No module named pytraj" during make
> test step
>
> On Thu, Apr 15, 2021, 石谷沁 wrote:
> >
> >I’m here again…so I successfully installed the serial AMBER packages.
> >
> >make test.serial works well except for 1 error on pytraj test.
> >
> >The traceback showed that program correctly used the python3.8 in
> >miniconda (which was installed automatically during AMBER build)
> >
> >Below is the full message. Does it related to other python packages
> >of the Linux platform?
> >
> >ModuleNotFoundError: No module named 'pytraj'
>
> > To supplement, python was installed via Miniconda. I followed the
> > prompts during build and make.
>
> This problem comes up a lot. As best I can tell, "older" miniconda
> python installations are missing something that is needed to build
> pytraj. The current install procedure (in AmberTools20) seems to be working.
>
> I'm cc-ing to Hai in case he has any way of debugging this problem.
> The build scripts don't fail (although there may be some error message
> hidden in there), but the pytraj module is not found.
>
> If you try a fresh install of AmberTools20 using cmake, I think you
> should get a functioning pytraj.
>
> (Of course, if you are not planning to use pytraj, you can ignore the
> failure....)
>
> ...good luck....dac
>
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>
>
> ***********免责声明*************
>
>
> 本电子邮件中包含的信息仅供指定的或授权的个人或团体使用。本电子邮件及附件中提到的信息可能是保密信息或者法律特许保密的信息。如果你不是指定收件
> 人,对于邮件内容的任何披露、复制、散布或者任何针对邮件内容进行的行为都是违法行为,需要严格禁止。如果您误收该电子邮件,请立即通知本公司并从您
> 的系统中删除全部原始信息。该邮件可能会对您的系统或者数据造成损坏,对此我公司不承担任何责任。除非与公司业务有关,否则本邮件中的观点、结论、或
> 者其它包含在邮件中的信息均为发件人个人行为,并不代表我公司。我公司有权保留对收发邮件的监控权利。
>
> ***********Business Email Disclaimer**************
>
> This e-mail and any attachments are meant for the intended recipient
> only and may contain information belonging to Qilu Pharma that is
> privileged, confidential, proprietary, and/or otherwise protected or
> prohibited from disclosure. If you are not the correct recipient or
> received this e-mail erroneously, please inform the sender immediately
> and delete this mail from your system. Qilu Pharma state no liability
> for any damage to your system and data caused by this email. Unless
> this email is related to the business with the company, otherwise any
> views or opinions presented in this email are solely from the sender.
> Qilu Pharma has the right to monitor the sending and receiving of the e-mail.
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber


***********免责声明*************

本电子邮件中包含的信息仅供指定的或授权的个人或团体使用。本电子邮件及附件中提到的信息可能是保密信息或者法律特许保密的信息。如果你不是指定收件人,对于邮件内容的任何披露、复制、散布或者任何针对邮件内容进行的行为都是违法行为,需要严格禁止。如果您误收该电子邮件,请立即通知本公司并从您的系统中删除全部原始信息。该邮件可能会对您的系统或者数据造成损坏,对此我公司不承担任何责任。除非与公司业务有关,否则本邮件中的观点、结论、或者其它包含在邮件中的信息均为发件人个人行为,并不代表我公司。我公司有权保留对收发邮件的监控权利。

***********Business Email Disclaimer**************

 This e-mail and any attachments are meant for the intended recipient only and may contain information belonging to Qilu Pharma that is privileged, confidential, proprietary, and/or otherwise protected or prohibited from disclosure. If you are not the correct recipient or received this e-mail erroneously, please inform the sender immediately and delete this mail from your system. Qilu Pharma state no liability for any damage to your system and data caused by this email. Unless this email is related to the business with the company, otherwise any views or opinions presented in this email are solely from the sender. Qilu Pharma has the right to monitor the sending and receiving of the e-mail.
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Thu Apr 15 2021 - 23:30:02 PDT
Custom Search