This is a read-only mirror of pymolwiki.org

Difference between revisions of "Windows Install"

From PyMOL Wiki
Jump to navigation Jump to search
m (3 revisions)
 
(21 intermediate revisions by 6 users not shown)
Line 1: Line 1:
[[Category:Installation|Windows]]
+
This page describes how to install PyMOL on Microsoft Windows.
 +
 
 +
== Incentive PyMOL ==
 +
 
 +
[http://www.schrodinger.com Schrödinger] provides an installer to paying sponsors (EXE for PyMOL 2.0, MSI for previous version). The bundle also includes ready-to-use [[APBS]], [[morph|RigiMOL]], an MPEG encoder for movie export, and a small molecule energy minimization engine.
 +
 
 +
Download: https://pymol.org/#download
 +
 
 +
== Open-Source PyMOL ==
 +
 
 +
Open-Source PyMOL is available [https://sourceforge.net/p/pymol/code/HEAD/tree/trunk/pymol/LICENSE free of charge]. It also allows sponsors to create highly customized PyMOL installations which might not be possible with the MSI installer.
 +
 
 +
Pre-compiled Open-Source PyMOL is available free from [http://www.lfd.uci.edu/~gohlke/pythonlibs/#pymol Christoph Gohlke of the Laboratory for Fluorescence Dynamics, University of California, Irvine].
 +
 
 +
# Install the latest version of Python 3 for Windows (e.g., by going to http://www.python.org/downloads/ and choosing the x64 EXE installer). Use the standard options, which should mean that the installation directory is most likely C:\Users\<Your Username>\AppData\Local\Programs\Python\Python38). Make sure the option to add environment variables is selected.
 +
# Do install [https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads the current Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019]. Otherwise the installed PyMOL binary may fail to run (without any error message!). 
 +
# Download the [http://www.lfd.uci.edu/~gohlke/pythonlibs/#pymol-open-source appropriate wheel files], along with all requirement wheel files (including [http://www.lfd.uci.edu/~gohlke/pythonlibs/#pip pip], [http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy Numpy] and [http://www.lfd.uci.edu/~gohlke/pythonlibs/#pmw PMW]) into a single file directory, e.g., <code>C:\Users\<Your Username>\Downloads\PyMOL_installation</code>
  
== Installing ==
+
Navigate to the installation directory in a CMD window <source lang = python>cd C:\Users\<Your Username>\Downloads\PyMOL_installation</source> (or where ever you put the files) and begin the installation using the command:
== Pre-compiled PyMOL ==
+
<source lang = python>python.exe pip-20.x.x-py2.py3-none-any.whl/pip install --no-index --find-links="%CD%" pymol_launcher</source> If your python install is part of your PATH variable, then running (where x refers to the version number of pip): <source lang = python>python pip-20.x.x-py2.py3-none-any.whl/pip install --no-index --find-links="%CD%" pymol_launcher</source>
Pre-compiled PyMOL is available free from Christoph Gohlke of the Laboratory for Fluorescence Dynamics, University of California, Irvine [http://www.lfd.uci.edu/~gohlke/pythonlibs/#pymol here].
+
should suffice.  
  
For example install [http://www.python.org/getit/releases/2.7/ python 2.7] on windows, and then compile the open source pymol for free.
+
To update PyMOL update the files in the PyMOL install directory and run: <source lang = python>pip install --upgrade --no-deps pymol.whl</source> where <code>pymol.whl</code> is replaced by the PyMOL wheel file name (not the launcher, the launcher should not require updating). To use the newer single-window Qt interface, also install the optional PyQt5 dependency for your Python installation: <source lang=python> pip install pyqt5 </source>
# Install python, 2.7 for windows. Use the standard options.
 
# Download [http://www.lfd.uci.edu/~gohlke/pythonlibs/#pymol appropriate installer] and select according to your python version 2.7 and 32/64 bit system.
 
# Run the downloaded installer
 
# PyMOL is now installed in: C:\Python27\PyMOL
 
# Run PyMOL by executing: C:\Python27\PyMOL\PyMOL.exe
 
You should make a shortcut to the PyMOL.exe tile and place in your Start menu. <br>
 
If you right-click a .pdb file, and "Open with", and then point to C:\Python27\PyMOL\PyMOL.exe, you can double click .pdb files.
 
  
 
=== Extend PyMOL with additional scripts ===
 
=== Extend PyMOL with additional scripts ===
Line 28: Line 37:
 
sys.path.append(pymol_git)
 
sys.path.append(pymol_git)
 
sys.path.append(os.environ['PYMOL_GIT_MOD'])
 
sys.path.append(os.environ['PYMOL_GIT_MOD'])
 
'''PyMoL''' shortcut<br>
 
Make a '''pymol''' directory in your homepath. '''mkdir %HOMEPATH%\pymol'''. Then make sure, PyMOL starts here, when you open the shortcut.<br>
 
Target: C:\python27\PyMOL\pymol.cmd <br>
 
Start in: %HOMEPATH%\pymol
 
  
 
# Make setting changes to Plugin Manager
 
# Make setting changes to Plugin Manager
Line 45: Line 49:
 
Now start pymol, and enjoy all the plugins available from the menu.
 
Now start pymol, and enjoy all the plugins available from the menu.
  
=== Personal changes to opening of PyMOL ===
+
'''PyMOL''' shortcut<br>
You can make a "pymolrc.pym" file, and put it under "C:\Users\YOU". <br>
+
Make a '''pymol''' directory in your homepath. '''mkdir %HOMEPATH%\pymol'''  Then make sure, PyMOL starts here, when you open the shortcut.<br>
In the file you can write things that PyMOL should change from standard values, when it opens.<br>
+
Make a shortcut to the .cmd file, and modify it. <br>
See [[Pymolrc | more here.]]
+
Target: C:\python27\PyMOL\pymol.cmd <br>
 
+
Start in: %HOMEPATH%\pymol
== Binary ==
 
To install PyMOL from the binaries, just run the executable you've [http://pymol.sf.net/ downloaded].
 
 
 
== Source ==
 
To get the latest features, you should download the [http://sourceforge.net/svn/?group_id=4546 PyMOL source] from the [http://sourceforge.net/projects/pymol/ project page].
 
 
 
=== Directions using CygWin ===
 
* Install [http://www.cygwin.com/ CygWin].  Make sure you install the following modules:
 
You should have similar packages installed as described [http://www.pymolwiki.org/index.php/Linux_Install#Mint11_Linux_.28Ubuntu.29_-_Tested_for_PyMOL_1.4.1 here]. Note, that you might need gcc-4.4 instead of  gcc-4.5.
 
** C++ (gcc or g++ package name)
 
** Python
 
** OpenGL
 
** PNG
 
* run '''python setup.py install''' in the source directory
 
* run '''python setup2.py install''' in the source directory
 
* install Pmw
 
  
 +
== See Also ==
  
 +
* [[pymolrc]]
 +
* [[Linux Install]]
 +
* [[MAC Install]]
  
 +
[[Category:Installation|Windows]]
 
[[Category:Technical Issues|Windows Install]]
 
[[Category:Technical Issues|Windows Install]]
 
[[Category:Windows]]
 
[[Category:Windows]]

Latest revision as of 03:21, 22 June 2021

This page describes how to install PyMOL on Microsoft Windows.

Incentive PyMOL

Schrödinger provides an installer to paying sponsors (EXE for PyMOL 2.0, MSI for previous version). The bundle also includes ready-to-use APBS, RigiMOL, an MPEG encoder for movie export, and a small molecule energy minimization engine.

Download: https://pymol.org/#download

Open-Source PyMOL

Open-Source PyMOL is available free of charge. It also allows sponsors to create highly customized PyMOL installations which might not be possible with the MSI installer.

Pre-compiled Open-Source PyMOL is available free from Christoph Gohlke of the Laboratory for Fluorescence Dynamics, University of California, Irvine.

  1. Install the latest version of Python 3 for Windows (e.g., by going to http://www.python.org/downloads/ and choosing the x64 EXE installer). Use the standard options, which should mean that the installation directory is most likely C:\Users\<Your Username>\AppData\Local\Programs\Python\Python38). Make sure the option to add environment variables is selected.
  2. Do install the current Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019. Otherwise the installed PyMOL binary may fail to run (without any error message!).
  3. Download the appropriate wheel files, along with all requirement wheel files (including pip, Numpy and PMW) into a single file directory, e.g., C:\Users\<Your Username>\Downloads\PyMOL_installation

Navigate to the installation directory in a CMD window

cd C:\Users\<Your Username>\Downloads\PyMOL_installation

(or where ever you put the files) and begin the installation using the command:

python.exe pip-20.x.x-py2.py3-none-any.whl/pip install --no-index --find-links="%CD%" pymol_launcher

If your python install is part of your PATH variable, then running (where x refers to the version number of pip):

python pip-20.x.x-py2.py3-none-any.whl/pip install --no-index --find-links="%CD%" pymol_launcher

should suffice.

To update PyMOL update the files in the PyMOL install directory and run:

pip install --upgrade --no-deps pymol.whl

where pymol.whl is replaced by the PyMOL wheel file name (not the launcher, the launcher should not require updating). To use the newer single-window Qt interface, also install the optional PyQt5 dependency for your Python installation:

 pip install pyqt5

Extend PyMOL with additional scripts

If you now want to extend the capabilities of PyMOL, and take advantage of all the available plugins+scripts "out there", then do the following.

  1. First install "numpy" as an available module to Python. Select appropriate installer from here
  2. Download the script/plugin collection Pymol-script-repo from a .zip file from here
git clone https://github.com/Pymol-Scripts/Pymol-script-repo
  1. Unpack it to here: C:\Python27\Lib\site-packages\pymol\pymol_path\Pymol-script-repo Double check that the folder name is correct and the same.

Open "Notepad" and write.

# Add paths to sys.path so PyMOL can find modules and scripts
import sys, os
pymol_git = os.path.abspath(os.path.join(os.environ['PYMOL_PATH'], 'Pymol-script-repo'))
os.environ['PYMOL_GIT_MOD'] = os.path.join(pymol_git,'modules')
sys.path.append(pymol_git)
sys.path.append(os.environ['PYMOL_GIT_MOD'])

# Make setting changes to Plugin Manager
import pymol.plugins
pymol.plugins.preferences = {'instantsave': False, 'verbose': False}
pymol.plugins.autoload = {'apbs_tools': False}
pymol.plugins.set_startup_path([os.path.join(pymol_git, 'plugins'), os.path.join(sys.prefix, 'Lib', 'site-packages', 'pmg_tk', 'startup')])
pymol.plugins.preferences = {'instantsave': True, 'verbose': False}

Then "File->Save as->All files-> C:\Python27\Lib\site-packages\pymol\pymol_path\run_on_startup.py

Now start pymol, and enjoy all the plugins available from the menu.

PyMOL shortcut
Make a pymol directory in your homepath. mkdir %HOMEPATH%\pymol Then make sure, PyMOL starts here, when you open the shortcut.
Make a shortcut to the .cmd file, and modify it.
Target: C:\python27\PyMOL\pymol.cmd
Start in: %HOMEPATH%\pymol

See Also