1

I recently upgraded to the latest version of PyCharm (2019.01) and my Anaconda 3 install no longer starts up in the Python Console. I get the following error:

Traceback (most recent call last):
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.2\helpers\pydev\pydevconsole.py", line 5, in <module>
    from _pydev_comm.rpc import make_rpc_client, start_rpc_server, start_rpc_server_and_make_client
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.2\helpers\pydev\_pydev_comm\rpc.py", line 4, in <module>
    from _pydev_comm.server import TSingleThreadedServer
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.2\helpers\pydev\_pydev_comm\server.py", line 4, in <module>
    from _shaded_thriftpy.server import TServer
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.2\helpers\third_party\thriftpy\_shaded_thriftpy\server.py", line 9, in <module>
    from _shaded_thriftpy.transport import (
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.2\helpers\third_party\thriftpy\_shaded_thriftpy\transport\__init__.py", line 57, in <module>
    from .sslsocket import TSSLSocket, TSSLServerSocket  # noqa
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.1.2\helpers\third_party\thriftpy\_shaded_thriftpy\transport\sslsocket.py", line 7, in <module>
    import ssl
  File "C:\Users\bnielson\AppData\Local\Continuum\anaconda3\lib\ssl.py", line 98, in <module>
    import _ssl             # if we can't import it, let the error propagate
ImportError: DLL load failed: The specified module could not be found.

I have Googled this and there are a number of sites that talk about similar errors but none of their fixes have worked for me so far.

Strangely, I can go to the Terminal tab and start up Anaconda 3's Python Manually and this works just fine.

I have tried uninstalling and reinstalling Anaconda 3 and PyCharm. I have tried not importing previous settings so that I'm getting a fresh start. None of this has worked.

Anaconda 2.7 works just fine.

I tried this link already:

I'm not even clear why I'd be getting this error in the first place, so it's hard to troubleshoot.

Note: I am intentionally trying to start up Anaconda 3 as originally installed and not a Conda or Virtual Environment (as this loses all the installed items that come as default.)

I am on Windows.

Bruce Nielson
  • 753
  • 8
  • 23
  • I like Anaconda though because it comes preloaded with everything. Does VSCode work with Anaconda if you want it to? – Bruce Nielson May 26 '19 at 02:34
  • When using PyCharm, I have pip install XXX fail on a regular basis. Probably because I'm on windows. That's why I use Anaconda. – Bruce Nielson May 26 '19 at 02:51
  • Does VSCode have an interactive debugger like PyCharm? That's the main reason I use it. I'm incapable of programming sanely without an interactive debugger. – Bruce Nielson May 26 '19 at 02:53
  • maybe the PyCharm python interpreter is different from the anaconda python? – vb_rises May 26 '19 at 02:59
  • Steps to happiness: (a) uninstall PyCharm (b) completely uninstall Anaconda (c) Install VSCode (d) install Python extension (e) watch a few YouTube videos to see how it works (f) never look back. – cssyphus May 26 '19 at 03:00
  • Being new to VSCode, where do you install the extensions? Is it a built in store? Or do I have to go to WWW and find download? – Bruce Nielson May 26 '19 at 03:38
  • I am in VSCode and got the following when running a Hello World program: C:/Users/bnielson/AppData/Local/Continuum/anaconda3/Scripts/activate PS C:\Users\bnielson\Board Game Recommender> conda activate base conda : The term 'conda' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + conda activate base ... – Bruce Nielson May 26 '19 at 03:55
  • It seems to not want to start up the terminal correctly. It will run the program, but even calling C:\Users\bnielson\AppData\Local\Continuum\anaconda3\Scripts\activate does not activate the base environment. So I can't do anything useful at the terminal, such as python or pip. – Bruce Nielson May 26 '19 at 04:04
  • Oh, I should probably mention that I got that by right mouse clicking and running in terminal. If I start a terminal directly, it seems to work. Not sure the difference. – Bruce Nielson May 26 '19 at 04:10
  • I did the steps above, [full uninstalling Anaconda](https://stackoverflow.com/questions/29337928/how-to-remove-anaconda-from-windows-completely) and installing python again via [the Windows installer](https://www.python.org/downloads/windows/). You really don't want any trace of conda left on your system or it will continue to cause grief. Extensions are installed within the app, just using the square boxy icon on the left-side toolbar. [See Also](https://stackoverflow.com/questions/40043313/vs-code-how-to-change-the-highlights-for-selected-text-and-selection-word-match/55249964#55249964) – cssyphus May 26 '19 at 04:47
  • @BruceNielson How are you making out with VSCode? Is it working out for you? Any questions? *(I'm still pretty new to it myself, and by no means a super-user, but I've learned enough to make it work and to love it for coding Python...)* – cssyphus May 26 '19 at 22:44
  • I am currently out of school for the summer, so I may not get a chance to really try it deeply for a while. But I really like what I've seen so far. I'm not sure I'm ready to uninstall anaconda just yet... but you make a strong case. :) – Bruce Nielson May 27 '19 at 16:18

2 Answers2

1

Try PyCharm 2019.1.3 RC build. The problem should be fixed there I believe (PY-35141).

Pavel Karateev
  • 7,737
  • 3
  • 32
  • 59
  • I'm so glad you posted this. I'm not sure I'm brave enough to try an RC. :) But thank you. Hopefully they'll release the bug fix soon. – Bruce Nielson May 27 '19 at 21:35
1

Per our discussions in comments:

There's a new kid on the block. Suggest that you consider VSCode. Although it is from Microsoft, it is free and built on open source. It also has integrated Git, debugging and extensions. Also has an active and responsive issues forum on github for reporting bugs and requesting features.

Steps to happiness: (a) uninstall PyCharm (b) completely uninstall Anaconda (c) install VSCode (d) install Python extension (e) watch a few YouTube videos to see how it works (f) never look back.

Suggest you also review this SO question/answer for important tweaking tip

Note that it is imperative to fully uninstall Anaconda, and install Python comme il faut, as Anaconda will likely continue to cause you grief if you don't.

Extensions are installed within the app, just using the square boxy icon on the left-side toolbar. I suggest you consider:

  • Python extension
  • Code Runner
  • Bracket Pair Colorizer
  • highlight-words
  • Numbered Bookmarks
  • Git History /and/ GitLens Git supercharged (if you use git)

VSCode keyboard cheatsheet

Important keystrokes to know off-the-start:

F9 - add/remove breakpoint (right-click on breakpoint to add conditions)

F5 - run in debugger mode

Ctrl Alt n - run full speed (via CodeRunner extension)

cssyphus
  • 37,875
  • 18
  • 96
  • 111