-
Notifications
You must be signed in to change notification settings - Fork 99
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
ImportError: cannot import name pyparsing_common #10
Comments
Hi! Can you try starting python and just importing the pybel module? As I can see from the error log above, the problem result from an import there and not from openbabel, which is a different module. |
Python 2.7.10 (default, Oct 23 2015, 18:05:06)
thus i tried to install pybel using pip:sudo -H pip install pybel then tried importing pybel again (obtained same error):Python 2.7.10 (default, Oct 23 2015, 18:05:06)
obtained same error. Python version issue?i don't know if this is the reason however Python 2.7.10 (default, Oct 23 2015, 18:05:06)
using python 3.6
i went to the location of each of the 2 pyparsing.py (for 2.7 and for 3) and did i didn't find any hits in the 2.7 pyparsing.py while found a lot of hits in 3.6 pyparsing.py thus i tried to remove the 2.7 pyparsing.py and re-install a new version (however, permission denied even when i changed user and loged as root) and when i tried changing it manually (copying the 3.6 version) "file not available to writing" although i have rw------- i couldn't use the 3.6 python version because using 3.6 openbabel for some reason does not install properly that is why i am using 2.7. this is the error that i obtain when i try. pip3.6 install --ignore-installed plip
Command "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;file='/private/var/folders/nz/v_szcmrx6fn3tww6c1xlzt5w0000gn/T/pip-build-9koal6v_/openbabel/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /var/folders/nz/v_szcmrx6fn3tww6c1xlzt5w0000gn/T/pip-j6r3agxu-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/nz/v_szcmrx6fn3tww6c1xlzt5w0000gn/T/pip-build-9koal6v_/openbabel/ I am going to try installing it on our university Linux server today and check if this problem persists (there i can change python models). Thanks a lot and sorry for the bothersome problem. |
It may be that your OpenBabel version doesn't match your Python bindings for some reason. You could try to remove OpenBabel and pybel and then compile OpenBabel with Python bindings (i.e. pybel) from source. |
@Darakah I think, you should change homebrew python as default and install plip -again- In my Mac (Yosemite), I have two python version: 2.7.10 (mac native) and 2.7.13 (macports). Note: Step for install: make sure that all modules are in the list with command if openbabel is not the same version with macports or not installed at all, install or upgrade it with command then install plip with pip-2.7 (get 1.3.0 version) or python2.7 (download source code and get 1.3.4 version) make symlink for running plipcmd in any folder get result: |
Hi Sorry for the late reply, The problem on my Mac was the version of pyparsing.py (it does not contain pyparsing_common). the project that I am working on will be placed on the university servers, thus I tried to install it directly on the CentOS Linux server. I was able to install it as a python package (using pip install plip) and then I installed pymol and added it to the PYTHONPATH and the LD_LIBRARY_PATH. I followed the instructions of how to use it in a python script: ~ ssh -Y galam@linuxdev.accbyblos.lau.edu.lb
thus I decided to use plipcmd as a bash program, I cloned the repository, added plipcmd to the $PATH variable and tried to run it. [galam@linuxdev ~]$ plipcmd (made sure it was present)It is not creating the pymol session or any pics: [galam@linuxdev ~]$ ls (i placed --maxthreads 1 because if i dont add it or i specify something larger than one i get a python traceback from multiprocessing module pool.py) it does generate the results in xml and txt formats: [galam@linuxdev ~]$ ls I obtain the correct results.any idea to what is happening? this is the output of plipcmd with the verbose option: [galam@linuxdev ~]$ ls
Starting analysis of plipfixed.4km6_Xj6F1E.pdbPDB structure successfully read. LIG [SMALLMOLECULE] -- LIG:Z:1Contains 3 aromatic ring(s). NAG [SMALLMOLECULE] -- NAG:A:303-> may be biologically irrelevant <- CA [ION] -- CA:A:301Binding site atoms in vicinity (7.5 A max. dist: 89). NAG [SMALLMOLECULE] -- NAG:A:304-> may be biologically irrelevant <- NAG [SMALLMOLECULE] -- NAG:A:302-> may be biologically irrelevant <- this is the output without maxthreads option:
Starting analysis of plipfixed.4km6_Xj6F1E.pdbPDB structure successfully read. LIG [SMALLMOLECULE] -- LIG:Z:1Contains 3 aromatic ring(s). NAG [SMALLMOLECULE] -- NAG:A:303-> may be biologically irrelevant <- CA [ION] -- CA:A:301Binding site atoms in vicinity (7.5 A max. dist: 89). NAG [SMALLMOLECULE] -- NAG:A:304-> may be biologically irrelevant <- NAG [SMALLMOLECULE] -- NAG:A:302-> may be biologically irrelevant <- Generating visualizations in parallel on 5 cores ...Traceback (most recent call last): NOTE: if i remove -py options and do not specify the maxthread thing it works properly. [galam@linuxdev ~]$ ls
Starting analysis of plipfixed.4km6_Xj6F1E.pdbPDB structure successfully read. LIG [SMALLMOLECULE] -- LIG:Z:1Contains 3 aromatic ring(s). NAG [SMALLMOLECULE] -- NAG:A:303-> may be biologically irrelevant <- CA [ION] -- CA:A:301Binding site atoms in vicinity (7.5 A max. dist: 89). NAG [SMALLMOLECULE] -- NAG:A:304-> may be biologically irrelevant <- NAG [SMALLMOLECULE] -- NAG:A:302-> may be biologically irrelevant <- Finished analysis. Find the result files in the working directory. [galam@linuxdev ~]$ ls thanks a lot and sorry again! |
@Darakah
I have succeed installed PLIP on Ubuntu Desktop 32bit/64bit and it run well with multicore supported. |
@o7o is there anything similar? its just that i am using it to analyze the obtained poses from a docking pipeline that i automated on a webpage. |
I think only @ssalentin has the right answer for you because PLIP has online version you can access till now at: sorry, I haven't try PLIP on any CLI server. |
We are running our server on Ubuntu with graphics support. If you have custom projects (such as your docking analysis on a webpage), you might consider using JSMol and recreating the visualization from the XML files. We did that also for the interactive 3D diagram on the web service. |
Hi,
I have been trying to download "plip" on my Mac laptop to use in a drug docking pipeline. When I try to run "plip" from the bash command line "$ plip" (after creating the alias) and from python, I get this same error:
Traceback (most recent call last):
File "/Users/gaby/pliptool/plip/plipcmd", line 33, in
from modules.preparation import *
File "/Users/gaby/pliptool/plip/modules/preparation.py", line 24, in
from detection import *
File "/Users/gaby/pliptool/plip/modules/detection.py", line 24, in
from supplemental import *
File "/Users/gaby/pliptool/plip/modules/supplemental.py", line 38, in
import pybel
File "/Users/gaby/Library/Python/2.7/lib/python/site-packages/pybel/init.py", line 61, in
from . import canonicalize
File "/Users/gaby/Library/Python/2.7/lib/python/site-packages/pybel/canonicalize.py", line 14, in
from .parser.language import rev_abundance_labels
File "/Users/gaby/Library/Python/2.7/lib/python/site-packages/pybel/parser/init.py", line 5, in
from .parse_bel import BelParser
File "/Users/gaby/Library/Python/2.7/lib/python/site-packages/pybel/parser/parse_bel.py", line 16, in
from .modifiers import *
File "/Users/gaby/Library/Python/2.7/lib/python/site-packages/pybel/parser/modifiers/init.py", line 3, in
from .fragment import FragmentParser
File "/Users/gaby/Library/Python/2.7/lib/python/site-packages/pybel/parser/modifiers/fragment.py", line 59, in
from pyparsing import pyparsing_common as ppc, Keyword, Optional
ImportError: cannot import name pyparsing_common
If i try the following:
$ python
no error, however when I do the following command
I get the same error mentioned above.
now, in regards to pyparsing_comman. before trying plip command, I tried to import "pyparsing_common" to check if it was the problem. when I ran it this morning (before trying plip):
$ python
it works just fine, then I tried running same plip commands as above, I reach same import error!
I understand this seems crazy, however, I have no idea what to do, I tried everything.
for how I installed plip:
method 1: using pip
installed plip using pip which also installed the needed dependencies openbabel, numpy, lxml
Then I installed PyMol and all its dependencies using homebrew as indicated here
https://pymolwiki.org/index.php/MAC_Install
result: same error
Method 2: manual
before i installed using pip, i tried installing manually by downloading the plip-stable zip file and following the commands specified in the README file. when i reach the step
plip -i 1vsn -yv
I get the same error which is "ImportError: cannot import name pyparsing_common"
also installed openbabel and all other dependencies in this case and added needed stuff to the PATH variable.
python version: 2.7.10
OS X el capitan 10.11.3
Any help will be appriciated, i don't know how to solve this.
Thanks a lot and great work on this amazing software (i tried the web service and it provides amazing information regarding the interactions - especially the amazing 3D visualization of the interactions).
The text was updated successfully, but these errors were encountered: