{"id":7948,"date":"2022-03-29T20:17:40","date_gmt":"2022-03-29T19:17:40","guid":{"rendered":"https:\/\/www.blopig.com\/blog\/?p=7948"},"modified":"2023-03-03T14:55:55","modified_gmt":"2023-03-03T14:55:55","slug":"how-to-install-open-source-pymol-on-windows-10","status":"publish","type":"post","link":"https:\/\/www.blopig.com\/blog\/2022\/03\/how-to-install-open-source-pymol-on-windows-10\/","title":{"rendered":"How to Install Open Source PyMOL on Windows 10"},"content":{"rendered":"\n<p class=\"has-text-align-justify wp-block-paragraph\">It is possible to get an installer for the crystallographer&#8217;s favourite molecular visualization tool for Windows machines, that is if you are willing to pay a fee. Fortunately, <a href=\"https:\/\/www.lfd.uci.edu\/~gohlke\/pythonlibs\/\">Christoph Gohlke has made available<\/a> free, pre-compiled Windows versions of the latest PyMOL software, along with all of it&#8217;s requirements, it&#8217;s just not particularly straightforward to install. The PyMOLWiki offers a <a href=\"https:\/\/pymolwiki.org\/index.php\/Windows_Install\">three-step guide<\/a> on how to do this and I will break it down to make it somewhat clearer.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. Install the latest version of Python 3 for Windows<\/h2>\n\n\n\n<p class=\"has-text-align-justify wp-block-paragraph\">Download the Windows Installer (x-bit) for Python 3 from their <a href=\"https:\/\/www.python.org\/downloads\/windows\/\" target=\"_blank\" rel=\"noreferrer noopener\">website<\/a>, x being your Windows architecture &#8211; 32 or 64.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized is-style-default\"><a href=\"https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2022\/03\/image-6.png?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" loading=\"lazy\" src=\"https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2022\/03\/image-6.png?resize=347%2C197&#038;ssl=1\" alt=\"\" class=\"wp-image-7960\" width=\"347\" height=\"197\" srcset=\"https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2022\/03\/image-6.png?w=462&amp;ssl=1 462w, https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2022\/03\/image-6.png?resize=300%2C171&amp;ssl=1 300w\" sizes=\"auto, (max-width: 347px) 100vw, 347px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-text-align-justify wp-block-paragraph\">Then, follow <a href=\"https:\/\/docs.python.org\/3\/using\/windows.html#the-full-installer\" target=\"_blank\" rel=\"noreferrer noopener\">the instructions<\/a> on how to install it. You can check if it has installed by running the following in PowerShell:<\/p>\n\n\n\n<!--more-->\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">py<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If it is installed, you should get this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized is-style-default\"><a href=\"https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2022\/03\/image-7.png?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" loading=\"lazy\" src=\"https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2022\/03\/image-7.png?resize=625%2C161&#038;ssl=1\" alt=\"\" class=\"wp-image-7962\" width=\"625\" height=\"161\" srcset=\"https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2022\/03\/image-7.png?w=879&amp;ssl=1 879w, https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2022\/03\/image-7.png?resize=300%2C77&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2022\/03\/image-7.png?resize=768%2C197&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2022\/03\/image-7.png?resize=624%2C160&amp;ssl=1 624w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><\/figure>\n<\/div><\/div>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">2. Install the latest Microsoft Visual C++ Redistributable for Visual Studio<\/h2>\n\n\n\n<p class=\"has-text-align-justify wp-block-paragraph\">Fairly straightforward, <a href=\"https:\/\/docs.microsoft.com\/en-us\/cpp\/windows\/latest-supported-vc-redist?view=msvc-170\">download<\/a> and install the current Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019, again making sure to pick the right version for your Windows architecture.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized is-style-default\"><a href=\"https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2022\/03\/image-9.png?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" loading=\"lazy\" src=\"https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2022\/03\/image-9.png?resize=440%2C198&#038;ssl=1\" alt=\"\" class=\"wp-image-7965\" width=\"440\" height=\"198\" srcset=\"https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2022\/03\/image-9.png?w=880&amp;ssl=1 880w, https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2022\/03\/image-9.png?resize=300%2C135&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2022\/03\/image-9.png?resize=768%2C345&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.blopig.com\/blog\/wp-content\/uploads\/2022\/03\/image-9.png?resize=624%2C280&amp;ssl=1 624w\" sizes=\"auto, (max-width: 440px) 100vw, 440px\" \/><\/a><figcaption>I have a 64-bit Windows, so I downloaded the highlighted version.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">3. Download all required wheel files<\/h2>\n\n\n\n<p class=\"has-text-align-justify wp-block-paragraph\">There are three main requirements to install PyMOL: pip, <a href=\"https:\/\/www.lfd.uci.edu\/~gohlke\/pythonlibs\/#numpy\">Numpy<\/a> and <a href=\"https:\/\/www.lfd.uci.edu\/~gohlke\/pythonlibs\/#pmw\">PMW<\/a>. The Python installation comes with pip, so download numpy and pmw from the links above. For numpy, download the latest numpy+mkl file for the Python version you have installed and the one matching your Windows architecture. For example, for Python 3.10 on a 64-bit Windows, download the <a href=\";\">numpy\u20111.22.3+mkl\u2011cp310\u2011cp310\u2011win_amd64.whl<\/a> file. <\/p>\n\n\n\n<p class=\"has-text-align-justify wp-block-paragraph\">On the same page, Ctrl+F PMW to find the two available PMW .whl files, and download the Python 3 version.<\/p>\n\n\n\n<p class=\"has-text-align-justify wp-block-paragraph\">Similarly, <a rel=\"noreferrer noopener\" href=\"https:\/\/www.lfd.uci.edu\/~gohlke\/pythonlibs\/#pymol-open-source\" target=\"_blank\">download the PyMOL .whl files<\/a>, there are two: the PyMOL launcher and PyMOL itself &#8211; again, check that they match your Python version and Windows architecture. <\/p>\n\n\n\n<p class=\"has-text-align-justify wp-block-paragraph\">Make sure all .whl files are in the same file directory.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4. Install requirements and PyMOL from wheels<\/h2>\n\n\n\n<p class=\"has-text-align-justify wp-block-paragraph\">Open an instance of Windows PowerShell and change to the directory where you have all the .whl files (with the cd command). Install numpy and PMW from the wheels FIRST, using the following command in PowerShell or <a rel=\"noreferrer noopener\" href=\"https:\/\/pip.pypa.io\/en\/latest\/user_guide\/#installing-from-wheels\" target=\"_blank\">follow these instructions:<\/a><\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">py -m pip install your_wheel_file.whl<\/pre>\n<\/div><\/div>\n<\/div>\n<\/div>\n<\/div><\/div>\n<\/div>\n<\/div>\n<\/div><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">You should install them in this order:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Numpy<\/li><li>PMW<\/li><li>PyMOL<\/li><li>PyMOL launcher<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">5. Launch PyMOL<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">PyMOL should now be installed in your Python directory. If you don&#8217;t know where that is, type in the following command in PowerShell:<\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">py -c \"import os, sys; print(os.path.dirname(sys.executable))\"<\/pre>\n<\/div><\/div>\n\n\n\n<p class=\"has-text-align-justify wp-block-paragraph\">The output should give you the path. Change to that directory, and type in:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">.\\PyMOL.exe<\/pre>\n\n\n\n<p class=\"has-text-align-justify wp-block-paragraph\">In an ideal world, you now have installed Open Source PyMOL and can enjoy all plugins+scripts out there.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It is possible to get an installer for the crystallographer&#8217;s favourite molecular visualization tool for Windows machines, that is if you are willing to pay a fee. Fortunately, Christoph Gohlke has made available free, pre-compiled Windows versions of the latest PyMOL software, along with all of it&#8217;s requirements, it&#8217;s just not particularly straightforward to install. [&hellip;]<\/p>\n","protected":false},"author":88,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","wikipediapreview_detectlinks":true,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"ngg_post_thumbnail":0,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[14,351,227,589],"tags":[479,132,423],"ppma_author":[560],"class_list":["post-7948","post","type-post","status-publish","format-standard","hentry","category-howto","category-molecular-visualization","category-python-code","category-windows","tag-open-source","tag-pymol","tag-windows"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"authors":[{"term_id":560,"user_id":88,"is_guest":0,"slug":"gheorghe","display_name":"Gheorghe Rotaru","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/9f11daacb9337bcc502177c0b18ea123b76aaf598d5b065ffa9e08690ac4d72b?s=96&d=mm&r=g","author_category":"","user_url":"","last_name":"Rotaru","first_name":"Gheorghe","job_title":"","description":""}],"_links":{"self":[{"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/posts\/7948","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/users\/88"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/comments?post=7948"}],"version-history":[{"count":5,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/posts\/7948\/revisions"}],"predecessor-version":[{"id":7980,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/posts\/7948\/revisions\/7980"}],"wp:attachment":[{"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/media?parent=7948"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/categories?post=7948"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/tags?post=7948"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=7948"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}