BGI-SynBio / PyMOL-PUB

Rapid generation of high-quality structure figures for publication with PyMOL-PUB
https://pymol-pub.readthedocs.io/en/latest/
GNU General Public License v3.0
65 stars 2 forks source link

How to launch PyMOL-PUB? #3

Closed Tangbbmc closed 6 months ago

Tangbbmc commented 7 months ago

I have installed PyMOL-PUB on Ubuntu system by the following command: pip install PyMOL-PUB. However, I fail to know how to lanuch PyMOL-PUB.

dell@dell-OptiPlex-Tower-Plus-7010:~/Desktop$ pip install PyMOL-PUB Defaulting to user installation because normal site-packages is not writeable Collecting PyMOL-PUB Downloading PyMOL_PUB-1.2-py3-none-any.whl (54 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.5/54.5 KB 489.5 kB/s eta 0:00:00 Requirement already satisfied: pillow in /usr/lib/python3/dist-packages (from PyMOL-PUB) (9.0.1) Collecting matplotlib Downloading matplotlib-3.8.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.6 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.6/11.6 MB 11.4 MB/s eta 0:00:00 Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from PyMOL-PUB) (1.21.5) Requirement already satisfied: pymol in /usr/lib/python3/dist-packages (from PyMOL-PUB) (2.5.0) Collecting biopython Downloading biopython-1.83-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.1/3.1 MB 10.7 MB/s eta 0:00:00 Collecting cycler>=0.10 Downloading cycler-0.12.1-py3-none-any.whl (8.3 kB) Collecting packaging>=20.0 Downloading packaging-24.0-py3-none-any.whl (53 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.5/53.5 KB 5.3 MB/s eta 0:00:00 Collecting fonttools>=4.22.0 Downloading fonttools-4.50.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.6 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.6/4.6 MB 11.3 MB/s eta 0:00:00 Requirement already satisfied: python-dateutil>=2.7 in /usr/lib/python3/dist-packages (from matplotlib->PyMOL-PUB) (2.8.1) Collecting contourpy>=1.0.1 Downloading contourpy-1.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (310 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 310.7/310.7 KB 10.1 MB/s eta 0:00:00 Collecting kiwisolver>=1.3.1 Downloading kiwisolver-1.4.5-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.6 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 11.2 MB/s eta 0:00:00 Requirement already satisfied: pyparsing>=2.3.1 in /usr/lib/python3/dist-packages (from matplotlib->PyMOL-PUB) (2.4.7) Installing collected packages: packaging, kiwisolver, fonttools, cycler, contourpy, biopython, matplotlib, PyMOL-PUB Successfully installed PyMOL-PUB-1.2 biopython-1.83 contourpy-1.2.0 cycler-0.12.1 fonttools-4.50.0 kiwisolver-1.4.5 matplotlib-3.8.3 packaging-24.0

ytchen-1 commented 6 months ago

If you want to use the GUI of PyMOL-PUB, please enter 'python3 windows.py' to start the GUI interface after entering the molpub folder. If you want to write your own python drawing code, you need to 'import molpub' first before you can use its various interfaces. For specific examples, please see the drawing code in the cases folder.

Tangbbmc commented 6 months ago

However, I encountered the following error when running python3 windows.py

@.:/home/dell/Desktop# cd /home/dell/.local/lib/python3.10/site-packages/molpub @.:/home/dell/.local/lib/python3.10/site-packages/molpub# ls handles.py init.py layouts.py pycache windows.py @.:/home/dell/.local/lib/python3.10/site-packages/molpub# python3 windows.py Traceback (most recent call last): File "/home/dell/.local/lib/python3.10/site-packages/molpub/windows.py", line 11, in from molpub.layouts import HighlightStructureImage, Figure ModuleNotFoundError: No module named 'molpub' @.:/home/dell/.local/lib/python3.10/site-packages/molpub#

发件人:Yuting Chen @.> 发送日期:2024-04-16 15:58:22 收件人:BGI-SynBio/PyMOL-PUB @.> 抄送人:Tangbbmc @.>,Author @.> 主题:Re: [BGI-SynBio/PyMOL-PUB] How to launch PyMOL-PUB? (Issue #3)

If you want to use the GUI of PyMOL-PUB, please enter 'python3 windows.py' to start the GUI interface after entering the molpub folder. If you want to write your own python drawing code, you need to 'import molpub' first before you can use its various interfaces. For specific examples, please see the drawing code in the cases folder. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

HaolingZHANG commented 6 months ago

Hello,  This error occurs because the working directory has not been set to include the'molpub' directory where windows.py is located. There are two simple solutions to resolve this issue: 

  1. Locate the windows.py file, copy it to a different folder, and execute the copied script using a command prompt.
  2. Open the entire project in PyCharm or another Python IDE, and run the windows.py file by clicking the run button in the IDE.

Best regards, Haoling