schrodinger / pymol-open-source

Open-source foundation of the user-sponsored PyMOL molecular visualization system.
https://pymol.org/
Other
1.15k stars 275 forks source link

Unable to import PyMol in local PC with default installation #402

Closed Immortals-33 closed 1 day ago

Immortals-33 commented 5 days ago

Dear PyMol developers:

Thanks for making this software! I've been having so much fun playing with it.

Lately I was trying to install pymol in one of my conda virtual environment on my PC (Win 11). I first encoutered a bug which looks like (Not exactly the same as the error message, but mostly similar as I can remember):

import pymol # Correct
from pymol import cmd
ERROR: Could not import cmd from pymol (unknown location)

Then I uninstalled pymol and tried to install it again from scratch. I followed the command on the official webpage: conda install -c conda-forge -c schrodinger pymol-bundle

The installation worked well, though after that I encountered the error like:

PyMOL failed to start, dumping diagnostics...
pymol-2.5.7-py310h5760301_0.json
conda build: py310h5760301_0 https://conda.anaconda.org/schrodinger/win-64
pymol-bundle-2.5.7-0.json
conda build: 0 https://conda.anaconda.org/schrodinger/win-64
pymol-upgrade-helper-1.1-1.json
conda build: 1 https://conda.anaconda.org/schrodinger/win-64
pymol-web-examples-2.4-1.json
conda build: 1 https://conda.anaconda.org/schrodinger/noarch

Operating System:
Windows-10-10.0.22621-SP0
PyQt5 5.15.10 (Qt 5.15.2)

Python:
3.10.14 | packaged by Anaconda, Inc. | (main, May  6 2024, 19:44:50) [MSC v.1916 64 bit (AMD64)]
prefix=d:\Anaconda\envs\mlfold
executable=d:\Anaconda\envs\mlfold\python.exe
filesystemencoding=utf-8

Qt, Python and PyMOL Environment Variables:
PYDEVD_IPYTHON_COMPATIBLE_DEBUGGING=1
PYDEVD_USE_FRAME_EVAL=NO
PYMOL_DATA=d:\Anaconda\envs\mlfold\share\pymol\data
PYMOL_PATH=d:\Anaconda\envs\mlfold\share\pymol
PYTHONIOENCODING=utf-8
PYTHONUNBUFFERED=1
PYTHONUTF8=1
PYTHON_FROZEN_MODULES=on
QT_API=pyqt5

PATH:
d:\Anaconda\envs\mlfold\Scripts;d:\Anaconda\envs\mlfold\Library\bin;d:\Anacond
a\envs\mlfold;D:\Anaconda\envs\mlfold;D:\Anaconda\envs\mlfold\Library\mingw-
w64\bin;D:\Anaconda\envs\mlfold\Library\usr\bin;D:\Anaconda\envs\mlfold\Librar
y\bin;D:\Anaconda\envs\mlfold\Scripts;D:\Anaconda\envs\mlfold\bin;D:\Anaconda\
condabin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\Sy
stem32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program
Files\Git\cmd;C:\Program Files\Bandizip;C:\Users\dell\AppData\Local\Microsoft\
WindowsApps;D:\Anaconda;D:\Anaconda\Library\bin;D:\Anaconda\Scripts;C:\Users\d
ell\AppData\Local\JetBrains\Toolbox\scripts;D:\Microsoft VS Code\bin;C:\Users\
dell\AppData\Roaming\TinyTeX\bin\windows;C:\Users\dell\AppData\Local\Microsoft
\WindowsApps;.

Libraries:
d:\Anaconda\envs\mlfold\Library\bin\libpng16.dll
d:\Anaconda\envs\mlfold\Library\bin\libxml2.dll
d:\Anaconda\envs\mlfold\Library\bin\freetype.dll
d:\Anaconda\envs\mlfold\Library\bin\glew32.dll
C:\WINDOWS\system32\opengl32.dll
C:\WINDOWS\system32\glu32.dll
C:\WINDOWS\system32\Ws2_32.dll
C:\WINDOWS\system32\comctl32.dll
C:\WINDOWS\system32\comdlg32.dll
C:\WINDOWS\system32\dhcpcsvc.dll
C:\WINDOWS\system32\netapi32.dll
C:\WINDOWS\system32\User32.dll
C:\WINDOWS\system32\Advapi32.dll
C:\WINDOWS\system32\oleaut32.dll
C:\WINDOWS\system32\ole32.dll
C:\WINDOWS\system32\shell32.dll
C:\WINDOWS\system32\shlwapi.dll

I also tried another two workarounds, but did not managed to fix the problem:

  1. Moved into another virtual environment (one existed and another completely brand new) and used the same command, encountered with the same errors as above;
  2. Add D:\Anaconda\envs\torch\Library\bin into the PATH of my PC.

I briefly walked through the issues and it seemed that the existing solutions did not work for me yet.

Do you have any suggestion? Should I install it somewhat another way, or do something with the PATH variable? By the way, is this potentially related to some version inconsistency of the pacakges?

Many thanks!

Best. Zhuoqi

JarrettSJohnson commented 5 days ago

Thanks for the report; Can you provide the conda list for your clean environment that you installed pymol-bundle into? One possibility is that, since it appears your using Anaconda, some packages from default and conda-forge are getting pulled in which may not be compatible.

Immortals-33 commented 5 days ago

Hi Jarrett,

Thanks for the quick response. The following is the conda list of a newly built environment, with several other packages:

# packages in environment at D:\Anaconda\envs\mlfold:
#
# Name                    Version                   Build  Channel
apbs                      1.5                           1
asttokens                 2.0.5              pyhd3eb1b0_0
biopython                 1.78            py310h2bbff1b_0
biotite                   1.0.1           py310h9e98ed7_0
biotraj                   1.2.1           py310h9e98ed7_1
blas                      1.0                         mkl
bottleneck                1.3.7           py310h9128911_0
brotli                    1.0.9                h2bbff1b_8
brotli-bin                1.0.9                h2bbff1b_8
brotli-python             1.0.9           py310hd77b12b_8
bzip2                     1.0.8                h2bbff1b_6
ca-certificates           2024.8.30            h56e8100_0
certifi                   2024.8.30          pyhd8ed1ab_0
cftime                    1.6.2           py310h9128911_0
charset-normalizer        3.3.2              pyhd3eb1b0_0
collada2gltf              2.1.4                         0
colorama                  0.4.6           py310haa95532_0
comm                      0.2.1           py310haa95532_0
contourpy                 1.3.0                    pypi_0
cudatoolkit               11.3.1               h59b6b97_2
cycler                    0.12.1                   pypi_0
debugpy                   1.6.7           py310hd77b12b_0
decorator                 5.1.1              pyhd3eb1b0_0
exceptiongroup            1.2.0           py310haa95532_0
executing                 0.8.3              pyhd3eb1b0_0
fasteners                 0.16.3             pyhd3eb1b0_0
fonttools                 4.54.1                   pypi_0
freetype                  2.12.1               ha860e81_0
glew                      2.1.0                hd77b12b_3
griddataformats           1.0.2              pyhd8ed1ab_0
gsd                       3.3.2           py310hb0944cc_0
h5py                      3.11.0          py310hed405ee_0
hatch-cython              0.5.1                    pypi_0
hdf4                      4.2.13               h712560f_2
hdf5                      1.12.1               h51c971a_3
icc_rt                    2022.1.0             h6049295_2
icu                       73.1                 h6c2663c_0
idna                      3.7             py310haa95532_0
intel-openmp              2023.1.0         h59b6b97_46320
ipykernel                 6.29.5             pyh4bbf305_0
ipython                   8.27.0          py310haa95532_0
ipywidgets                8.1.5              pyhd8ed1ab_0
jedi                      0.19.1          py310haa95532_0
joblib                    1.4.2           py310haa95532_0
jpeg                      9e                   h827c3e9_3
jupyter_client            8.6.0           py310haa95532_0
jupyter_core              5.7.2           py310haa95532_0
jupyterlab_widgets        3.0.13             pyhd8ed1ab_0
kiwisolver                1.4.7                    pypi_0
krb5                      1.20.1               h5b6d351_0
lcms2                     2.12                 h83e58a3_0
lerc                      3.0                  hd77b12b_0
libbrotlicommon           1.0.9                h2bbff1b_8
libbrotlidec              1.0.9                h2bbff1b_8
libbrotlienc              1.0.9                h2bbff1b_8
libclang                  14.0.6          default_hb5a9fac_1
libclang13                14.0.6          default_h8e68704_1
libcurl                   8.9.1                h0416ee5_0
libdeflate                1.17                 h2bbff1b_1
libffi                    3.4.4                hd77b12b_1
libholoplaycore           0.1.0_rc4                     0
libiconv                  1.16                 h2bbff1b_3
libnetcdf                 4.8.1                h6685c40_4
libpng                    1.6.39               h8cc25b3_0
libpq                     12.17                h906ac69_0
libsodium                 1.0.18               h62dcd97_0
libssh2                   1.11.0               h291bd65_0
libtiff                   4.5.1                hd77b12b_0
libuv                     1.48.0               h827c3e9_0
libwebp-base              1.3.2                h2bbff1b_0
libxml2                   2.9.14               h0ad7f3c_0
libzip                    1.8.0                h289538f_1
lz4-c                     1.9.4                h2bbff1b_1
matplotlib-base           3.9.2           py310he19b0ae_0
matplotlib-inline         0.1.6           py310haa95532_0
mda-xdrlib                0.2.0                    pypi_0
mdanalysis                2.7.0                    pypi_0
mengine                   1                             0
mkl                       2023.1.0         h6b88ed4_46358
mkl-service               2.4.0           py310h2bbff1b_1
mkl_fft                   1.3.10          py310h827c3e9_0
mkl_random                1.2.7           py310hc64d2fc_0
mmcif_pdbx                2.0.1              pyhd8ed1ab_0
mmtf-python               1.1.3              pyhd8ed1ab_0
mpeg_encode               1                             0
mrcfile                   1.5.3              pyhd8ed1ab_0
msgpack-python            1.0.3           py310h59b6b97_0
mtz2ccp4_px               1.1                           1
nest-asyncio              1.6.0           py310haa95532_0
netcdf4                   1.6.2           py310hadf358c_0
networkx                  3.3             py310haa95532_0
numexpr                   2.8.7           py310h2cd9be0_0
numpy                     1.25.0                   pypi_0
numpy-base                1.26.4          py310h65a83cf_0
openjpeg                  2.5.2                hae555c5_0
openssl                   3.3.2                h2466b09_0
openvr                    1.0.17                        0
packaging                 24.1            py310haa95532_0
pandas                    2.2.2           py310h5da7b33_0
parso                     0.8.3              pyhd3eb1b0_0
pdb2pqr                   3.6.1              pyhd8ed1ab_0
pillow                    10.4.0          py310h827c3e9_0
pip                       24.2            py310haa95532_0
platformdirs              3.10.0          py310haa95532_0
ply                       3.11            py310haa95532_0
pmw                       2.0.1           py310h5588dad_1008
prompt-toolkit            3.0.43          py310haa95532_0
prompt_toolkit            3.0.43               hd3eb1b0_0
propka                    3.5.1              pyhc1e730c_1
psutil                    5.9.0           py310h2bbff1b_0
pure_eval                 0.2.2              pyhd3eb1b0_0
pybind11-abi              5                    hd3eb1b0_0
pycollada                 0.8                pyhd8ed1ab_0
pygments                  2.15.1          py310haa95532_1
pymol                     2.5.7           py310h5760301_0
pymol-bundle              2.5.7                         0
pymol-upgrade-helper      1.1                           1
pymol-web-examples        2.4                           1
pyparsing                 3.1.4                    pypi_0
pyqt                      5.15.10         py310hd77b12b_0
pyqt5-sip                 12.13.0         py310h2bbff1b_0
pysocks                   1.7.1           py310haa95532_0
python                    3.10.14              he1021f5_1
python-dateutil           2.9.0post0      py310haa95532_2
python-tzdata             2023.3             pyhd3eb1b0_0
python_abi                3.10                    2_cp310
pytorch                   1.13.0             py3.10_cpu_0
pytorch-mutex             1.0                         cpu
pytz                      2024.1          py310haa95532_0
pywin32                   305             py310h2bbff1b_0
pyzmq                     25.1.2          py310hd77b12b_0
qt-main                   5.15.2              h19c9488_10
requests                  2.32.3          py310haa95532_0
rigimol                   1.3                           2
scikit-learn              1.5.1           py310hc64d2fc_0
scipy                     1.13.1          py310h8640f81_0
seaborn                   0.13.2          py310haa95532_0
setuptools                75.1.0          py310haa95532_0
sip                       6.7.12          py310hd77b12b_0
six                       1.16.0             pyhd3eb1b0_1
sqlite                    3.45.3               h2bbff1b_0
stack_data                0.2.0              pyhd3eb1b0_0
tbb                       2021.8.0             h59b6b97_0
threadpoolctl             3.5.0           py310h9909e9c_0
tidynamics                1.1.2              pyhd8ed1ab_0
tk                        8.6.14               h0416ee5_0
tomli                     2.0.1           py310haa95532_0
torchaudio                0.13.0                py310_cpu
torchvision               0.14.0                py310_cpu
tornado                   6.4.1           py310h827c3e9_0
tqdm                      4.66.5          py310h9909e9c_0
traitlets                 5.14.3          py310haa95532_0
typing_extensions         4.11.0          py310haa95532_0
tzdata                    2024a                h04d1e81_0
ucrt                      10.0.20348.0         haa95532_0
unicodedata2              15.1.0          py310h2bbff1b_0
urllib3                   2.2.2           py310haa95532_0
vc                        14.40                h2eaa2aa_1
vc14_runtime              14.40.33810         ha82c5b3_21
vs2013_runtime            12.0.21005                    1
vs2015_runtime            14.40.33810         h3bf8584_21
vtk-m                     1.8.0                h82bb817_2
wcwidth                   0.2.5              pyhd3eb1b0_0
wheel                     0.44.0          py310haa95532_0
widgetsnbextension        4.0.13             pyhd8ed1ab_0
win_inet_pton             1.1.0           py310haa95532_0
xz                        5.4.6                h8cc25b3_1
zeromq                    4.3.5                hd77b12b_0
zlib                      1.2.13               h8cc25b3_1
zstd                      1.5.5                hd43e919_2

And I also tried to build another conda environment, with:

conda create -n pymol python==3.9
conda install -c conda-forge -c schrodinger pymol-bundle # PyMol 3.0
conda install -c conda-forge -c schrodinger pymol-bundle=2.6 # PyMol 2.6

Both failed and stuck in the stage of Solving environment step, after I tried a few proxy settings. Is that perhaps because the python version must be > 3.10 or 3.11? I noticed that there's a notice on the official PyMol site indicating that python 3.10 or 3.11 is included in the bundle installation.

Thanks again!

JarrettSJohnson commented 5 days ago

Thanks for providing it; unfortunately, data in the channel column was the one that I was looking forward to observing to check to see where your packages are coming from (default vs conda-forge), but the info seems absent from what you provided. I think you're able to show it via

conda list --show-channel-urls

or have it on by default with changing this with conda config.

Also, pymol-bundle version 3.0.4 uses Python 3.10. 2.6 -> Python 3.11 ; Neither of these are to be installed in a Python 3.9 environment.

..But you could perhaps try the non-bundle versions and see if they work (these are supported for Python 3.9 to Python 3.12). conda install -c conda-forge -c schrodinger pymol

Immortals-33 commented 2 days ago

Hi Jarrett,

Thanks for your reply and sorry for the misunderstanding. For the conda list channels:

# packages in environment at D:\Anaconda\envs\mlfold:
#
# Name                    Version                   Build  Channel
apbs                      1.5                           1    schrodinger
asttokens                 2.0.5              pyhd3eb1b0_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
biopython                 1.78            py310h2bbff1b_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
biotite                   1.0.1           py310h9e98ed7_0    conda-forge
biotraj                   1.2.1           py310h9e98ed7_1    conda-forge
blas                      1.0                         mkl    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
bottleneck                1.3.7           py310h9128911_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
brotli                    1.0.9                h2bbff1b_8    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
brotli-bin                1.0.9                h2bbff1b_8    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
brotli-python             1.0.9           py310hd77b12b_8    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
bzip2                     1.0.8                h2bbff1b_6    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
ca-certificates           2024.8.30            h56e8100_0    conda-forge
certifi                   2024.8.30          pyhd8ed1ab_0    conda-forge
cftime                    1.6.2           py310h9128911_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
charset-normalizer        3.3.2              pyhd3eb1b0_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
collada2gltf              2.1.4                         0    schrodinger
colorama                  0.4.6           py310haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
comm                      0.2.1           py310haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
contourpy                 1.3.0                    pypi_0    pypi
cudatoolkit               11.3.1               h59b6b97_2    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
cycler                    0.12.1                   pypi_0    pypi
debugpy                   1.6.7           py310hd77b12b_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
decorator                 5.1.1              pyhd3eb1b0_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
exceptiongroup            1.2.0           py310haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
executing                 0.8.3              pyhd3eb1b0_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
fasteners                 0.16.3             pyhd3eb1b0_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
fonttools                 4.54.1                   pypi_0    pypi
freetype                  2.12.1               ha860e81_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
glew                      2.1.0                hd77b12b_3    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
griddataformats           1.0.2              pyhd8ed1ab_0    http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
gsd                       3.3.2           py310hb0944cc_0    http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
h5py                      3.11.0          py310hed405ee_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
hatch-cython              0.5.1                    pypi_0    pypi
hdf4                      4.2.13               h712560f_2    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
hdf5                      1.12.1               h51c971a_3    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
icc_rt                    2022.1.0             h6049295_2    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
icu                       73.1                 h6c2663c_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
idna                      3.7             py310haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
intel-openmp              2023.1.0         h59b6b97_46320    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
ipykernel                 6.29.5             pyh4bbf305_0    conda-forge
ipython                   8.27.0          py310haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
ipywidgets                8.1.5              pyhd8ed1ab_0    conda-forge
jedi                      0.19.1          py310haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
joblib                    1.4.2           py310haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
jpeg                      9e                   h827c3e9_3    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
jupyter_client            8.6.0           py310haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
jupyter_core              5.7.2           py310haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
jupyterlab_widgets        3.0.13             pyhd8ed1ab_0    conda-forge
kiwisolver                1.4.7                    pypi_0    pypi
krb5                      1.20.1               h5b6d351_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
lcms2                     2.12                 h83e58a3_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
lerc                      3.0                  hd77b12b_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libbrotlicommon           1.0.9                h2bbff1b_8    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libbrotlidec              1.0.9                h2bbff1b_8    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libbrotlienc              1.0.9                h2bbff1b_8    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libclang                  14.0.6          default_hb5a9fac_1    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libclang13                14.0.6          default_h8e68704_1    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libcurl                   8.9.1                h0416ee5_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libdeflate                1.17                 h2bbff1b_1    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libffi                    3.4.4                hd77b12b_1    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libholoplaycore           0.1.0_rc4                     0    schrodinger
libiconv                  1.16                 h2bbff1b_3    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libnetcdf                 4.8.1                h6685c40_4    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libpng                    1.6.39               h8cc25b3_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libpq                     12.17                h906ac69_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libsodium                 1.0.18               h62dcd97_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libssh2                   1.11.0               h291bd65_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libtiff                   4.5.1                hd77b12b_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libuv                     1.48.0               h827c3e9_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libwebp-base              1.3.2                h2bbff1b_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libxml2                   2.9.14               h0ad7f3c_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libzip                    1.8.0                h289538f_1    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
lz4-c                     1.9.4                h2bbff1b_1    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
matplotlib-base           3.9.2           py310he19b0ae_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
matplotlib-inline         0.1.6           py310haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
mda-xdrlib                0.2.0                    pypi_0    pypi
mdanalysis                2.7.0                    pypi_0    pypi
mengine                   1                             0    schrodinger
mkl                       2023.1.0         h6b88ed4_46358    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
mkl-service               2.4.0           py310h2bbff1b_1    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
mkl_fft                   1.3.10          py310h827c3e9_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
mkl_random                1.2.7           py310hc64d2fc_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
mmcif_pdbx                2.0.1              pyhd8ed1ab_0    conda-forge
mmtf-python               1.1.3              pyhd8ed1ab_0    http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
mpeg_encode               1                             0    schrodinger
mrcfile                   1.5.3              pyhd8ed1ab_0    http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
msgpack-python            1.0.3           py310h59b6b97_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
mtz2ccp4_px               1.1                           1    schrodinger
nest-asyncio              1.6.0           py310haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
netcdf4                   1.6.2           py310hadf358c_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
networkx                  3.3             py310haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
numexpr                   2.8.7           py310h2cd9be0_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
numpy                     1.25.0                   pypi_0    pypi
numpy-base                1.26.4          py310h65a83cf_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
openjpeg                  2.5.2                hae555c5_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
openssl                   3.3.2                h2466b09_0    conda-forge
openvr                    1.0.17                        0    schrodinger
packaging                 24.1            py310haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
pandas                    2.2.2           py310h5da7b33_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
parso                     0.8.3              pyhd3eb1b0_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
pdb2pqr                   3.6.1              pyhd8ed1ab_0    conda-forge
pillow                    10.4.0          py310h827c3e9_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
pip                       24.2            py310haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
platformdirs              3.10.0          py310haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
ply                       3.11            py310haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
pmw                       2.0.1           py310h5588dad_1008    conda-forge
prompt-toolkit            3.0.43          py310haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
prompt_toolkit            3.0.43               hd3eb1b0_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
propka                    3.5.1              pyhc1e730c_1    conda-forge
psutil                    5.9.0           py310h2bbff1b_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
pure_eval                 0.2.2              pyhd3eb1b0_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
pybind11-abi              5                    hd3eb1b0_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
pycollada                 0.8                pyhd8ed1ab_0    conda-forge
pygments                  2.15.1          py310haa95532_1    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
pymol                     2.5.7           py310h5760301_0    schrodinger
pymol-bundle              2.5.7                         0    schrodinger
pymol-upgrade-helper      1.1                           1    schrodinger
pymol-web-examples        2.4                           1    schrodinger
pyparsing                 3.1.4                    pypi_0    pypi
pyqt                      5.15.10         py310hd77b12b_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
pyqt5-sip                 12.13.0         py310h2bbff1b_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
pysocks                   1.7.1           py310haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
python                    3.10.14              he1021f5_1    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
python-dateutil           2.9.0post0      py310haa95532_2    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
python-tzdata             2023.3             pyhd3eb1b0_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
python_abi                3.10                    2_cp310    conda-forge
pytorch                   1.13.0             py3.10_cpu_0    pytorch
pytorch-mutex             1.0                         cpu    pytorch
pytz                      2024.1          py310haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
pywin32                   305             py310h2bbff1b_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
pyzmq                     25.1.2          py310hd77b12b_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
qt-main                   5.15.2              h19c9488_10    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
requests                  2.32.3          py310haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
rigimol                   1.3                           2    schrodinger
scikit-learn              1.5.1           py310hc64d2fc_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
scipy                     1.13.1          py310h8640f81_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
seaborn                   0.13.2          py310haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
setuptools                75.1.0          py310haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
sip                       6.7.12          py310hd77b12b_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
six                       1.16.0             pyhd3eb1b0_1    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
sqlite                    3.45.3               h2bbff1b_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
stack_data                0.2.0              pyhd3eb1b0_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
tbb                       2021.8.0             h59b6b97_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
threadpoolctl             3.5.0           py310h9909e9c_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
tidynamics                1.1.2              pyhd8ed1ab_0    http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
tk                        8.6.14               h0416ee5_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
tomli                     2.0.1           py310haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
torchaudio                0.13.0                py310_cpu    pytorch
torchvision               0.14.0                py310_cpu    pytorch
tornado                   6.4.1           py310h827c3e9_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
tqdm                      4.66.5          py310h9909e9c_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
traitlets                 5.14.3          py310haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
typing_extensions         4.11.0          py310haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
tzdata                    2024a                h04d1e81_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
ucrt                      10.0.20348.0         haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
unicodedata2              15.1.0          py310h2bbff1b_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
urllib3                   2.2.2           py310haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
vc                        14.40                h2eaa2aa_1    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
vc14_runtime              14.40.33810         ha82c5b3_21    conda-forge
vs2013_runtime            12.0.21005                    1    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
vs2015_runtime            14.40.33810         h3bf8584_21    conda-forge
vtk-m                     1.8.0                h82bb817_2    schrodinger
wcwidth                   0.2.5              pyhd3eb1b0_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
wheel                     0.44.0          py310haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
widgetsnbextension        4.0.13             pyhd8ed1ab_0    conda-forge
win_inet_pton             1.1.0           py310haa95532_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
xz                        5.4.6                h8cc25b3_1    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
zeromq                    4.3.5                hd77b12b_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
zlib                      1.2.13               h8cc25b3_1    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
zstd                      1.5.5                hd43e919_2    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main

Is there anything useful from your sight?

I also had another tries following your advice, including:

  1. A new environment with Python 3.11, where conda install -c conda-forge schrodinger pymol-bundle& conda install -c conda -forge schrodinger pymol stuck in the Solving environment stage;
  2. For the current environment (whose conda list shown above), I tried the non-bundle version of installation, where the messages are as follows:
    
    (mlfold) C:\Users\dell>conda install -c conda-forge -c schrodinger pymol
    Collecting package metadata (current_repodata.json): done
    Solving environment: done

All requested packages already installed.

Retrieving notices: ...working... done


And when I tried to `import pymol` or `from pymol import cmd`, it threw me similar errors:

import pymol PyMOL failed to start, dumping diagnostics... pymol-2.5.7-py310h5760301_0.json conda build: py310h5760301_0 https://conda.anaconda.org/schrodinger/win-64 pymol-bundle-2.5.7-0.json conda build: 0 https://conda.anaconda.org/schrodinger/win-64 pymol-upgrade-helper-1.1-1.json conda build: 1 https://conda.anaconda.org/schrodinger/win-64 pymol-web-examples-2.4-1.json conda build: 1 https://conda.anaconda.org/schrodinger/noarch

Operating System: Windows-10-10.0.22631-SP0 PyQt5 5.15.10 (Qt 5.15.2)

Python: 3.10.14 | packaged by Anaconda, Inc. | (main, May 6 2024, 19:44:50) [MSC v.1916 64 bit (AMD64)] prefix=D:\Anaconda\envs\mlfold executable=D:\Anaconda\envs\mlfold\python.exe filesystemencoding=utf-8

Qt, Python and PyMOL Environment Variables: LANG=en_US.UTF-8 PYMOL_DATA=D:\Anaconda\envs\mlfold\share\pymol\data PYMOL_PATH=D:\Anaconda\envs\mlfold\share\pymol QT_API=pyqt5

PATH: D:\Anaconda\envs\mlfold;D:\Anaconda\envs\mlfold\Library\mingw- w64\bin;D:\Anaconda\envs\mlfold\Library\usr\bin;D:\Anaconda\envs\mlfold\Librar y\bin;D:\Anaconda\envs\mlfold\Scripts;D:\Anaconda\envs\mlfold\bin;D:\Anaconda\ condabin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\Sy stem32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\Git\cmd;C:\Program Files\Bandizip;C:\Users\dell\AppData\Local\Microsoft\ WindowsApps;D:\Anaconda;D:\Anaconda\Library\bin;D:\Anaconda\Scripts;C:\Users\d ell\AppData\Local\JetBrains\Toolbox\scripts;D:\Microsoft VS Code\bin;C:\Users\ dell\AppData\Roaming\TinyTeX\bin\windows;C:\Users\dell\AppData\Local\Microsoft \WindowsApps;D:\Anaconda\envs\mlfold\Library\bin;.;C:\WINDOWS\system32;C:\WIND OWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WIN DOWS\System32\OpenSSH;C:\Program Files\Git\cmd;C:\Program Files\Bandizip;C:\Us ers\dell\AppData\Local\Microsoft\WindowsApps;D:\Anaconda;D:\Anaconda\Library\b in;D:\Anaconda\Scripts;C:\Users\dell\AppData\Local\JetBrains\Toolbox\scripts;D :\Microsoft VS Code\bin;C:\Users\dell\AppData\Roaming\TinyTeX\bin\windows;C:\U sers\dell\AppData\Local\Microsoft\WindowsApps;D:\Anaconda\envs\mlfold\Library\ bin;.

Libraries: D:\Anaconda\envs\mlfold\Library\bin\libpng16.dll D:\Anaconda\envs\mlfold\Library\bin\libxml2.dll D:\Anaconda\envs\mlfold\Library\bin\freetype.dll D:\Anaconda\envs\mlfold\Library\bin\glew32.dll C:\WINDOWS\system32\opengl32.dll C:\WINDOWS\system32\glu32.dll C:\WINDOWS\system32\Ws2_32.dll C:\WINDOWS\system32\comctl32.dll C:\WINDOWS\system32\comdlg32.dll C:\WINDOWS\system32\dhcpcsvc.dll C:\WINDOWS\system32\netapi32.dll C:\WINDOWS\system32\User32.dll C:\WINDOWS\system32\Advapi32.dll C:\WINDOWS\system32\oleaut32.dll C:\WINDOWS\system32\ole32.dll C:\WINDOWS\system32\shell32.dll C:\WINDOWS\system32\shlwapi.dll

Traceback (most recent call last): File "", line 1, in File "D:\Anaconda\envs\mlfold\lib\site-packages\pymol__init__.py", line 620, in import pymol._cmd ImportError: DLL load failed while importing _cmd: 找不到指定的模块。


Where `找不到指定的模块` means `The specified module could not be found.`

Do you have any further suggestions?
Many thanks!
Immortals-33 commented 2 days ago

Hi Jarrett, here's a quick follow-up.

I found a workaround in this repo, making two test:

  1. Build a new environment with python==12.0. Follow the instructions on the repo, it works.
  2. Enter my existing environment where problems arised, first trying conda uninstall pymol, throwing me a message package pymol doesn't exist (which is pretty strange as I did install pymol through official commands. As the python is3.10` in that environment, I went to this page to find the following compatible files: https://github.com/cgohlke/pymol-open-source-wheels/releases/download/v2024.9.21/pymol-3.1.0a0-cp310-cp310-win_amd64.whl https://github.com/cgohlke/pymol-open-source-wheels/releases/download/v2024.9.21/pymol_launcher-3.0-cp310-cp310-win_amd64.whl And follow the same instructions in the repo where it also works:
    import pymol
    from pymol import cmd # Successfully launched

    And also a little strange thing: It seems I downloaded pymol 3.1 in this case, but when I launch PyMol through cmd, the UI looks like 2.x.

And a few unsolved issues:

  1. The conda installation did not work for me in two different devices (both Windows PC), neither a pre-existing environment or a newly-built environment, with multiple Python versions;
  2. Workaround here did worked for me;
  3. Before the latest progress I'd also tried adding the PyMol location into $PATH variable, through indications from this wiki page. The $PATH I added is D:/Anaconda/envs/mlfold/share/pymol, which I noticed from these few lines of the original messages:
    Qt, Python and PyMOL Environment Variables:
    PYDEVD_IPYTHON_COMPATIBLE_DEBUGGING=1
    PYDEVD_USE_FRAME_EVAL=NO
    PYMOL_DATA=d:\Anaconda\envs\mlfold\share\pymol\data
    PYMOL_PATH=d:\Anaconda\envs\mlfold\share\pymol
    PYTHONIOENCODING=utf-8
    PYTHONUNBUFFERED=1
    PYTHONUTF8=1
    PYTHON_FROZEN_MODULES=on
    QT_API=pyqt5

    However this also did not work for me.

I put them here for those who encountered the same problems or interested in installing PyMol in programming manner in Windows OS, though I'm not sure why the conda installation guidelines completely stuck on my side...... Does anyone has any insights?

JarrettSJohnson commented 2 days ago

Like I mentioned in my earlier posts, you should not mix conda-forge packages (including python) with ones from default (aka main); this is likely the reason your environments are not resolving. Your options could be:

  1. Set your channels to only be conda-forge and schrodinger (you can probably do this with --override-channels (e.g. conda install -c conda-forge -c schrodinger --override-channels pymol-bundle ; and ensure the requested packages are only from these channels)
  2. Tweak your condarc to only consider the above channels
  3. Use miniforge/mambaforge which has conda-forge channel used by default.

Also that repo contains binaries for the open source version. The 3.X UI is exclusive to the PyMOL-Incentive and not available in PyMOL Open-Source.

Immortals-33 commented 1 day ago

Thanks for your advice. Had a quick test using conda install -c conda-forge -c schrodinger --overide-channels inside a new conda environment in another PC, the installation ran well. Although when trying the following commands:

import pymol
from pymol import cmd

>>>
.......
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Anaconda\envs\pymol\lib\site-packages\pymol\__init__.py", line 620, in <module>
    import pymol._cmd
ImportError: DLL load failed while importing _cmd: The specified module could not be found。

There still seems an DLL error. Not sure how to resolve it at the moment, yet the binaries work for me. Probably I'll take a deeper dive into it some other day.

And also,

Also that repo contains binaries for the open source version. The 3.X UI is exclusive to the PyMOL-Incentive and not available in PyMOL Open-Source.

Thanks again for your detailed and replies explanation! These are indeed helpful. Close this issue now.