{"id":1846,"date":"2022-02-11T15:23:47","date_gmt":"2022-02-11T15:23:47","guid":{"rendered":"https:\/\/blogs.gre.ac.uk\/cmssupport\/?page_id=1846"},"modified":"2022-02-11T15:23:47","modified_gmt":"2022-02-11T15:23:47","slug":"pycharm-community-edition","status":"publish","type":"page","link":"https:\/\/blogs.gre.ac.uk\/cmssupport\/software\/pycharm-community-edition\/","title":{"rendered":"PyCharm Community Edition"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">PyCharm, one of the many IDEs available, should already be pre-installed in most of the labs located in King William and should also be available on the <a rel=\"noreferrer noopener\" href=\"http:\/\/studentdesktop.gre.ac.uk\" data-type=\"URL\" data-id=\"studentdesktop.gre.ac.uk\" target=\"_blank\">student virtual desktop<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"no-python-interpreter-issue\">No Python Interpreter Issue<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Some of you may have experienced an issue when creating or importing an existing project where the PyCharm says that there are &#8220;No Python Interpreters&#8221; configured and that no code can be executed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is due to either a few reasons:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Python is not installed.<\/li><li>PyCharm might be attempting to install Python but (if you&#8217;re on University computers) you don&#8217;t have the permissions to directly install it from the website via default methods.<\/li><li>The path to the python interpreter was not given when creating or opening an existing project.<\/li><li>PyCharm was configured incorrectly.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">There are many different ways to fix this and can change from person to person if it&#8217;s being used on a personal device.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"configuring-pycharm\">Configuring PyCharm<\/h2>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"creating-a-new-pycharm-project\" style=\"font-size:26px\">Creating a new PyCharm project<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When opening PyCharm and creating a &#8220;new project&#8221;, you should be greeted with a small window asking where you want to save the project and the interpreter you wish to use.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"809\" height=\"422\" src=\"https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/chrome_2022-02-11_13-16-21.png\" alt=\"\" class=\"wp-image-1848\" srcset=\"https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/chrome_2022-02-11_13-16-21.png 809w, https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/chrome_2022-02-11_13-16-21-300x156.png 300w, https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/chrome_2022-02-11_13-16-21-768x401.png 768w, https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/chrome_2022-02-11_13-16-21-671x350.png 671w, https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/chrome_2022-02-11_13-16-21-150x78.png 150w\" sizes=\"auto, (max-width: 809px) 100vw, 809px\" \/><figcaption>Figure 1<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Figure 1<\/em> shows the default settings for the interpreter and as you can see it&#8217;s set to use &#8216;<strong>Virtualenv<\/strong>&#8216; (<em>which is fine if you&#8217;re on your own personal computer)<\/em> but this is <span style=\"text-decoration: underline\">not usable<\/span> for most of the university&#8217;s computers and university virtual desktop. The base interpreter is currently set to Python&#8217;s install page and will require admin permissions to install, which you do not have on our computers.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"solutions\" style=\"font-size:26px\">Solutions<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Make sure Anaconda is installed (which should be installed for most of our labs in King William). If it isn&#8217;t, you can find it in Software Centre.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Afterwards, in the configs, <strong>change &#8216;Virtualenv&#8217; to &#8216;Conda&#8217;<\/strong> and select the Python version that you need.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"801\" height=\"408\" src=\"https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/chrome_2022-02-11_13-34-57.png\" alt=\"\" class=\"wp-image-1854\" srcset=\"https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/chrome_2022-02-11_13-34-57.png 801w, https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/chrome_2022-02-11_13-34-57-300x153.png 300w, https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/chrome_2022-02-11_13-34-57-768x391.png 768w, https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/chrome_2022-02-11_13-34-57-687x350.png 687w, https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/chrome_2022-02-11_13-34-57-150x76.png 150w\" sizes=\"auto, (max-width: 801px) 100vw, 801px\" \/><figcaption>Figure 2<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Make sure that the Conda executable is set to the location where conda.exe is found (which should be almost identical to <em>Figure 2<\/em>)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once you&#8217;ve done that, create your project and you should be good to go!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"importing-configuring-an-existing-pycharm-project\" style=\"font-size:26px\">Importing\/Configuring an existing Pycharm project<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Open your python project and go to:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">File &gt; Settings &gt; Python Interpreter (it can be searched or located under your project name tab)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1004\" height=\"728\" src=\"https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/chrome_2022-02-11_14-24-33.png\" alt=\"\" class=\"wp-image-1856\" srcset=\"https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/chrome_2022-02-11_14-24-33.png 1004w, https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/chrome_2022-02-11_14-24-33-300x218.png 300w, https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/chrome_2022-02-11_14-24-33-768x557.png 768w, https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/chrome_2022-02-11_14-24-33-483x350.png 483w, https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/chrome_2022-02-11_14-24-33-150x109.png 150w\" sizes=\"auto, (max-width: 1004px) 100vw, 1004px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Click on the cog symbol and go to &#8216;Add&#8217;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"843\" height=\"185\" src=\"https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/image.png\" alt=\"\" class=\"wp-image-1857\" srcset=\"https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/image.png 843w, https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/image-300x66.png 300w, https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/image-768x169.png 768w, https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/image-150x33.png 150w\" sizes=\"auto, (max-width: 843px) 100vw, 843px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You&#8217;ll be prompted with a new window. Select <strong>Conda Environment<\/strong> and proceed to do the same checks and changes mentioned in the previous section.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"847\" height=\"580\" src=\"https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/image-1.png\" alt=\"\" class=\"wp-image-1858\" srcset=\"https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/image-1.png 847w, https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/image-1-300x205.png 300w, https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/image-1-768x526.png 768w, https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/image-1-511x350.png 511w, https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-content\/uploads\/sites\/18\/2022\/02\/image-1-150x103.png 150w\" sizes=\"auto, (max-width: 847px) 100vw, 847px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">For your own personal computers, you shouldn&#8217;t have this problem as you should have the right to install it via the default configs (Virtualenv). If you wish, you can also use the Anaconda method.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you&#8217;re unsure of anything or require additional help with this, try looking at this <a rel=\"noreferrer noopener\" href=\"https:\/\/www.jetbrains.com\/help\/pycharm\/configuring-python-interpreter.html#default-interpreter\" data-type=\"URL\" data-id=\"https:\/\/www.jetbrains.com\/help\/pycharm\/configuring-python-interpreter.html#default-interpreter\" target=\"_blank\">documentation<\/a> or seek help at the King William IT Counter at KW116. We&#8217;ll be happy to help!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PyCharm, one of the many IDEs available, should already be pre-installed in most of the labs located in King William and should also be available on the student virtual desktop. No Python Interpreter Issue Some &hellip;<\/p>\n","protected":false},"author":53,"featured_media":0,"parent":53,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1846","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-json\/wp\/v2\/pages\/1846","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-json\/wp\/v2\/users\/53"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-json\/wp\/v2\/comments?post=1846"}],"version-history":[{"count":0,"href":"https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-json\/wp\/v2\/pages\/1846\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-json\/wp\/v2\/pages\/53"}],"wp:attachment":[{"href":"https:\/\/blogs.gre.ac.uk\/cmssupport\/wp-json\/wp\/v2\/media?parent=1846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}