Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python.h not found during installation #4

Open
jmondal1 opened this issue Jun 4, 2016 · 5 comments
Open

python.h not found during installation #4

jmondal1 opened this issue Jun 4, 2016 · 5 comments

Comments

@jmondal1
Copy link

jmondal1 commented Jun 4, 2016

Hi
when issuing sudo python setup.py install command, I am facing following error that python.h is not found. Any help will be appreciated.

[sudo] password for jmondal:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/pmx
copying pmx/rotamer.py -> build/lib.linux-x86_64-2.7/pmx
copying pmx/mutdb.py -> build/lib.linux-x86_64-2.7/pmx
copying pmx/histogram.py -> build/lib.linux-x86_64-2.7/pmx
copying pmx/forcefield.py -> build/lib.linux-x86_64-2.7/pmx
copying pmx/options.py -> build/lib.linux-x86_64-2.7/pmx
copying pmx/ffparser.py -> build/lib.linux-x86_64-2.7/pmx
copying pmx/model.py -> build/lib.linux-x86_64-2.7/pmx
copying pmx/geometry.py -> build/lib.linux-x86_64-2.7/pmx
copying pmx/futil.py -> build/lib.linux-x86_64-2.7/pmx
copying pmx/cpp.py -> build/lib.linux-x86_64-2.7/pmx
copying pmx/library.py -> build/lib.linux-x86_64-2.7/pmx
copying pmx/xdrfile.py -> build/lib.linux-x86_64-2.7/pmx
copying pmx/atomselection.py -> build/lib.linux-x86_64-2.7/pmx
copying pmx/init.py -> build/lib.linux-x86_64-2.7/pmx
copying pmx/ndx.py -> build/lib.linux-x86_64-2.7/pmx
copying pmx/chain.py -> build/lib.linux-x86_64-2.7/pmx
copying pmx/builder.py -> build/lib.linux-x86_64-2.7/pmx
copying pmx/molecule.py -> build/lib.linux-x86_64-2.7/pmx
copying pmx/forcefield2.py -> build/lib.linux-x86_64-2.7/pmx
copying pmx/odict.py -> build/lib.linux-x86_64-2.7/pmx
copying pmx/tCNC.py -> build/lib.linux-x86_64-2.7/pmx
copying pmx/parser.py -> build/lib.linux-x86_64-2.7/pmx
copying pmx/atom.py -> build/lib.linux-x86_64-2.7/pmx
copying pmx/xtc.py -> build/lib.linux-x86_64-2.7/pmx
running build_ext
building 'pmx/_pmx' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
creating build/temp.linux-x86_64-2.7/src/pmx
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Isrc/pmx -I/usr/include/python2.7 -c src/pmx/Geometry.c -o build/temp.linux-x86_64-2.7/src/pmx/Geometry.o
In file included from src/pmx/Geometry.h:32:0,
from src/pmx/Geometry.c:31:
src/pmx/pmx.h:32:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

@vgapsys
Copy link
Collaborator

vgapsys commented Jun 4, 2016

Hey jmondal1,

you need to install python-dev package prior to installing pmx.

Vytas

@jmondal1
Copy link
Author

jmondal1 commented Jun 5, 2016

Dear Vytas

Thanks for your note. After installing python-dev, the setup.py installation script worked out fine.
Now, I want to use the mutation scripts ( eg. mutate.py, hyrbid_topology etc) to morph an amino acid residue to another residue using charmm36. However, when issuing the following command,
python mutate.py -help
I am getting following errors:
Traceback (most recent call last):
File "mutate.py", line 38, in
from pmx import *
ImportError: No module named pmx

It created a new folder called pmx in the installation directory called pmx where bunch of python programs are present.
ls pmx
atom.py chain.py forcefield2.py geometry.py library.py mutdb.py options.py tCNC.py
atomselection.py cpp.py forcefield.py histogram.py model.py ndx.py parser.py xdrfile.py
builder.py ffparser.py futil.py init.py molecule.py odict.py rotamer.py xtc.py

On the other hand, it also created some new files in /usr/local/lib/python2.7/dist-packages/pmx

ls pmx

atom.py chain.pyc forcefield2.pyc histogram.py model.pyc odict.py rotamer.py xtc.py
atom.pyc cpp.py forcefield.py histogram.pyc molecule.py odict.pyc rotamer.pyc xtc.pyc
atomselection.py cpp.pyc forcefield.pyc init.py molecule.pyc options.py tCNC.py
atomselection.pyc data futil.py init.pyc mutdb.py options.pyc tCNC.pyc
builder.py ffparser.py futil.pyc library.py mutdb.pyc parser.py xdrfile.py
builder.pyc ffparser.pyc geometry.py library.pyc ndx.py parser.pyc xdrfile.pyc
chain.py forcefield2.py geometry.pyc model.py ndx.pyc _pmx.so _xdrio.so

My question is : why it is having problems in importerror: no module named pmx. I have put both /usr/local/lib/python2.7/dist-packages/pmx in my bash_profile.
Jagannath

On Jun 5, 2016, at 12:03 AM, vgapsys [email protected] wrote:

Hey jmondal1,

you need to install python-dev package prior to installing pmx.

Vytas


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@vgapsys
Copy link
Collaborator

vgapsys commented Jun 6, 2016

Is /usr/local/lib/python2.7/dist-packages present in your PYTHONPATH?
Maybe you could try: export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/dist-packages
and then running one of the pmx scripts to see if the error goes away?

@jmondal1
Copy link
Author

jmondal1 commented Jun 8, 2016

Hi
Thanks very much. After setting the PYTHONPATH, I can execute the
mutate.py script.
However, I am having issues if I plan to mutate the first residue of a
protein using mutate.py. There the script is crashing. I guess that it
might have to do with how mutate.py handles the terminal residues.
This happens if I have a single amino acid residue to mutate. If I do not
add any terminal group then the mutate.py works. But then subsequent
pdb2gmx generates a fatal error saying that there is no terminal group.
But if I add the terminal group in N and C terminal of the same
single-residue system ( I added NH3 and COO), then the program mutate.py
does not work.
Any suggestion will be helpful.

On Mon, Jun 6, 2016 at 3:58 PM, vgapsys [email protected] wrote:

Is /usr/local/lib/python2.7/dist-packages present in your PYTHONPATH?
Maybe you could try: export
PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/dist-packages
and then running one of the pmx scripts to see if the error goes away?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#4 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/ARcZAvaC3Lpa_qOcNrVD2k0s88qGxK0qks5qI_ZMgaJpZM4IuLys
.

@vgapsys
Copy link
Collaborator

vgapsys commented Jun 9, 2016

pmx currently does not support mutations of the terminal residues. If you want to mutate a terminal residue, you will have to add a capping group to the protein: ACE for N-term and/or NME for C-term according to the amber ff naming, in charmm C-term cap is named CT3, in opls C-term is NAC. This way the first/last amino acid technically will not be terminal residue anymore and the mutation should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants