Comments (5)
File "c:\python35\lib\site-packages\plip-1.3.3-py3.5.egg\plip\modules\report.p
y", line 100
print et.tostring(self.xmlreport, pretty_print=True)
^
SyntaxError: invalid syntax
That's your error: a "Python 2" formatted print
(Python 3 requires parentheses around print
arguments). I guess PLIP is not written for compatibility with Python 3.
Anyway, why would you do that? As far as I know, pymol has no support for Python 3, so you are probably running into much bigger than that this.
from plip.
That's your error: a "Python 2" formatted print (Python 3 requires parentheses
around print arguments). I guess PLIP is not written for compatibility with Python 3.
Thanks for your info, really, I did not know the error mean. I have successful installed and ran PLIP on Ubuntu 16.04 Desktop LTS version in Virtual applications, as I know, this Ubuntu version had python 3.5 as its default python. See screenshot at link: https://goo.gl/PCUFqv
Sorry, I can not show you the screenshot for PLIP on Ubuntu 16.04 at this time. It is in my PC at office. I will check it later.
Anyway, why would you do that? As far as I know, pymol has no support for Python 3,
so you are probably running into much bigger than that this.
Officially maybe, I have used an unofficial packages from Gohlke for windows system (here the screenshoot link: https://goo.gl/uZoIbn). In my case, PyMOL 1.8.5.0 ran well in python 3.5. I will show you the screenshoot later.
one more, macport has released PyMOL 1.8.4.0 and it has variant port for python 3.5.
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id$
PortSystem 1.0
PortGroup python 1.0
PortGroup active_variants 1.1
PortGroup compilers 1.0
name pymol
version 1.8.4.0
categories science chemistry
license PSF
maintainers gmail.com:howarth.at.macports openmaintainer
description Molecular graphics system
long_description PyMOL is a molecular graphics system with an embedded Python interpreter \
designed for real-time visualization and rapid generation of high-quality \
molecular graphics images and animations.
platforms darwin
homepage http://www.pymol.org/
master_sites sourceforge
fetch.type svn
svn.url https://svn.code.sf.net/p/pymol/code/trunk/pymol
svn.revision 4163
worksrcdir pymol
compilers.choose cc cxx
compilers.setup
variant python27 conflicts python34 python35 description {Use Python 2.7} {}
variant python34 conflicts python27 python35 description {Use Python 3.4} {}
variant python35 conflicts python27 python34 description {Use Python 3.5} {}
if {[variant_isset python34]} {
python.default_version 34
} elseif {[variant_isset python35]} {
python.default_version 35
} else {
default_variants +python27
python.default_version 27
}
python.link_binaries no
depends_lib-append port:freeglut \
port:freetype \
port:glew \
port:libpng \
port:libGLU \
port:mesa \
port:py${python.version}-numpy \
port:py${python.version}-pmw \
port:py${python.version}-scipy \
port:py${python.version}-tkinter \
port:tcl \
port:tk
depends_run port:xdpyinfo
# py-scipy is not universal
universal_variant no
patchfiles pymol_shell.diff \
pmg_tk_platform.patch \
apbs-psize.patch
if {${os.platform} eq "darwin" && ${os.major} >= 12} {
patchfiles-append pymol-use-glkit.diff
}
require_active_variants tcl "" corefoundation
require_active_variants tk "" quartz
post-patch {
reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/setup.py
reinplace "s|@@PYTHON_PKGDIR@@|${python.pkgd}|g" ${worksrcpath}/setup/pymol_macports
reinplace "s|@@PYTHON_BINARY@@|${python.bin}|g" ${worksrcpath}/setup/pymol_macports
reinplace "s|\"-O3\",|\"-O3\", \"-g\",|g" ${worksrcpath}/setup.py
reinplace "s|cxx + \' \' + cxxflags|\'${configure.cxx} \' + cxxflags|g" ${worksrcpath}/monkeypatch_distutils.py
}
use_parallel_build yes
build {}
pre-destroot {
destroot.env CC="${configure.cc}" CXX="${configure.cxx}" PREFIX_PATH="${prefix}"
}
post-destroot {
file copy ${worksrcpath}/setup/pymol_macports ${destroot}${prefix}/bin/pymol
file attributes ${destroot}${prefix}/bin/pymol -permissions a+x
foreach d {data modules examples test scripts} {
copy ${worksrcpath}/${d} ${destroot}${python.pkgd}/pymol
}
}
from plip.
Two things learned: I did not know about these ports for Python 3, and neither that there were already builds of PyMOL 1.8.5.0.
But, anyway, I guess most of the available PyMOL scripts and plugins are designed for the Python 2 builds, and, while some might run flawlessly on Python 3 builds, others will cause a lot of trouble due to the small differences between Python 2 and 3.
So, for now, and unless I had a very good reason for not to, I would stay with the Python 2 PyMOL, at least until an 'official' Python 3 version has been around for some time, and people have had time enough to port their favorite scripts.
from plip.
I have to admit you intrigued me. I'm having a second look at PyMOL & PLIP on Python 3. The print
is the least of the problems, but maybe I can work out something and submit it as a pull request.
from plip.
Thank you for the feedback and the discussion.
Right now, PLIP only supports Python 2.x
Porting the PLIP code to Python 3 is definitely planned for the first half of the next year.
from plip.
Related Issues (20)
- python module stuck in loop with some pdb files
- Traceback (most recent call last): File "/plip/plip/plipcmd.py", line 16, in <module> from plip.basic import config, logger ModuleNotFoundError: No module named 'plip' HOT 1
- How to go about finding interacting Amino Acid Residues of ~1 billion compounds (In PDBQT) HOT 1
- Batch mode for protein-peptide
- pymol.CmdException: Error: Object not found
- << PLIP took forever >>
- Segmentation error with pdb files: HOT 1
- Calculate and report interactions for just one amino acid residue
- Generated RST file missing blank line after section titles
- Option not to add whitespace after trimming
- supplemental.py:90: RuntimeWarning: invalid value encountered in arccos
- The ligand structure is not visible.
- conf.NOHYDRO and aromatics
- MmCIF support HOT 1
- Extract interaction specifically for RNA-small molecule ligand and exclude other interactions in the output
- Incorrectly indexed interacting residues HOT 2
- Is there any parameters which can control the report results only include the lig interaction within protein instead of some residue interaction in protein? HOT 10
- How to get Information on sidechain/backbone hydrogen bond type in command options?
- Question about function plip.structure.detection.halogen
- Request for Official PLIP User Manual and Python Usage Documentation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plip.