This is a read-only mirror of pymolwiki.org

Difference between revisions of "Windows Install"

From PyMOL Wiki
Jump to navigation Jump to search
Line 65: Line 65:
 
* run '''python setup2.py install''' in the source directory
 
* run '''python setup2.py install''' in the source directory
 
* install Pmw
 
* install Pmw
 
== Problems & Solutions ==
 
 
===Problem: Installing PyMol 0.98 on WinXP Pro SP2===
 
If you get the following error '''while''' installing
 
<pre>
 
"16-bit Windows Subsystem.":
 
"C:\WINDOWS\SYSTEM32\AUTOEXEC.NT. The system file is not
 
suitable for running MS-DOS and Microsoft Windows applications.
 
Choose 'Close' to terminate the application.
 
</pre>
 
'''Fix''': Sounds like the '''AUTOEXEC.NT''' file is corrupt.  You can fix this problem by replacing
 
c:\WINDOWS\SYSTEM32\AUTOEXEC.NT
 
with the one in
 
c:\windows\repair
 
However if this doesn't work (or if the file is absent from this repair folder), use the file on the installation CDROM, it is
 
autoexec.nt_
 
in the '''i386''' folder.  Just type in a command window:
 
expand X:\i386\autoexec.nt_ c:\windows\system32\autoexec.nt
 
where '''X''' is the drive letter of your CDROM.
 
 
If this does not resolve your issue, visit this link:
 
[http://support.microsoft.com/default.aspx?scid=kb;en-us;324767 MS Support For This Issue]
 
where you may also find the answer to your question.
 
 
 
 
===Problem: PyMol Binary Crashes===
 
==== Video Driver ====
 
'''Fix''': Try updating your video card's driver software.  This is a common problem on laptops.
 
 
==== msvcr71.dll ====
 
'''Fix''': find the file '''msvcr71.dll''' on your computer and copy it to the directory that PyMol was installed to.
 
 
 
 
===Problem: Path Does Not Exist Error ===
 
 
'''Install Shield Problem with some Dell Laptops'''
 
 
With this problem irrespective of where you place the binaries for installing PyMol you receive an error claiming that the path\setup.exe does not exist.
 
 
'''Fix''': Install the windows binary through 16-bit MS-DOS console.
 
 
First place the PyMol setup binaries in an easy to find folder, e.g. C:\PyMol
 
 
Use the '''RUN''' command via '''Windows Start'''.
 
 
In the '''CLI''' type '''COMMAND.COM''' (note CMD will not work as it is a native interface and not true DOS).
 
 
In the '''DOS CLI''' that opens go back to the root directory '''C:\''' using the '''cd..''' command.
 
 
Then go to the folder into which you placed PyMol, e.g. '''cd PyMol'''.
 
 
Then type in '''setup.exe'''.
 
 
PyMol should now install, simply type '''exit''' to close the '''DOS CLI'''
 
  
 
== Using ==
 
== Using ==

Revision as of 14:27, 5 June 2012


Installing

Pre-compiled PyMOL

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

For example install python 2.7 on windows, and then compile the open source pymol for free.

  1. Install python, 2.7 for windows. Use the standard options.
  2. Download appropriate installer and select according to your python version 2.7 and 32/64 bit system.
  3. Run the downloaded installer
  4. PyMOL is now installed in: C:\Python27\PyMOL
  5. 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.
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

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
  3. Unpack it to here: C:\Python27\PyMOL\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 starting directory and change to it.
home_dir = os.path.abspath(os.path.join(os.environ['HOMEPATH'], 'pymol'))
if not os.path.exists(home_dir): os.makedirs(home_dir)
os.chdir(home_dir)

# 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\PyMOL\run_on_startup.py

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

Personal changes to opening of PyMOL

You can make a "pymolrc.pym" file, and put it under "C:\Users\YOU".
In the file you can write things that PyMOL should change from standard values, when it opens.
See more here.

Binary

To install PyMOL from the binaries, just run the executable you've downloaded.

Source

To get the latest features, you should download the PyMOL source from the project page.

Directions using CygWin

  • Install CygWin. Make sure you install the following modules:

You should have similar packages installed as described 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

Using

Debugging

On Windows, you need to launch PyMOLWin.exe from a Windows command line with the "+2" option to prevent PyMOL from hiding the console window: (start menu -> run -> cmd [return])

cd c:\program files\delano scientific\pymol

pymolwin + 2