4

I cannot get a prompt to appear in my Pycharm console. This appears to have something to do with an error that appears on startup:

Error: Cannot start process, the path specified for working directory is not a directory

I have looked at these threads and attempted solutions where I could:

Working directory error

How can I run my currently edited file in a PyCharm console in a way that I can type into the command line afterwards?

Interacting with program after execution

Does Pycharm have Interactive Python Interpreter?

Cannot start a console in newly installed Pycharm in Windows

PyCharm and Python Console

Pycharm interactive console does not work

Unlike Cannot start a console in newly installed Pycharm in Windows , I have no error message to go on; just a blank spot where I expected some >>>. I'm using Pycharm Community Edition 4.5. I'm using Mac OS 10.10.5, and sys.version in Python yields this.

'2.7.10 |Anaconda 2.3.0 (x86_64)| (default, May 28 2015, 17:04:42) \n[GCC 4.2.1 (Apple Inc. build 5577)]'

Despite a bad experience so far, I'm hoping to persist with Pycharm because it gets good reviews from my Python-savvy friends and family. Can I add any information to make this issue solvable? Thanks.

Community
  • 1
  • 1
eric_kernfeld
  • 495
  • 5
  • 17

3 Answers3

5

This issue was solved by re-starting Pycharm, closing all files, and choosing a folder, rather than a file, for a new project. Solution inspired by Working directory error .

This also allowed me to access the correct one out of my distressingly numerous available Python installations.

Community
  • 1
  • 1
eric_kernfeld
  • 495
  • 5
  • 17
1

When I have had this problem with an existing project, one or both of the following two actions has resolved it:

  1. Reset your Console configuration in the Pycharm Settings dialogue, particularly anything that involves directories.
  2. Close Pycharm, remove the .idea directory from the project, re-open Pycharm, and rebuild your Pycharm settings for the project from scratch. Especially after upgrading Pycharm. Stuff just breaks sometimes and their application logging is pretty terrible.
Tim
  • 41,901
  • 18
  • 127
  • 145
Chaffelson
  • 1,249
  • 9
  • 20
1

I was able to fix the problem by closing Pycharm then editing the .idea/workspace.xml and removing completely the section:

  <component name="DjangoConsoleOptions" (...)>
    <option name="myCustomStartScript" (...) />
  </component>
Emsi
  • 364
  • 2
  • 8