Note that there are some explanatory texts on larger screens.

plurals
  1. POPyCharm's Python console fails when PyPy and iPython co-exist in a virtualenv created project
    primarykey
    data
    text
    <p>Some version info:</p> <pre><code>OS: Mac OS X 10.8.4 Python: 2.7.2 (that came with the Mac OS X) PyPy: 2.0.2 iPython: 0.13.2 PyCharm: 2.5.1 </code></pre> <p>PyCharm's Python console fails when PyPy and iPython co-exist in a virtualenv created project.</p> <p><img src="https://f.cloud.github.com/assets/5052377/832022/899f7468-f228-11e2-98e9-49c2450996a7.png" alt="image"></p> <p>I created three virtual environment projects. I did not activate any of the virtual environments. So, the system python still exists as it is.</p> <p>Env - 1:</p> <pre><code>$ virtualenv -p /path/to/system/installed/python /path/to/sample_1/virtualenv/project $ /path/to/sample_1/virtualenv/project/bin/pip install ipython </code></pre> <p>Now, when I run the python console in PyCharm it works fine. (Interpreter in PyCharm is set to /path/to/sample_1/virtualenv/project/bin/python)</p> <p>Env - 2:</p> <pre><code>$ virtualenv -p /path/to/pypy /path/to/sample_2/virtualenv/project </code></pre> <p>Now, when I run the python console in PyCharm it works fine. (Interpreter in PyCharm is set to /path/to/sample_2/virtualenv/project/bin/python)</p> <p>Env - 3:</p> <pre><code>$ virtualenv -p /path/to/pypy /path/to/sample_3/virtualenv/project $ /path/to/sample_3/virtualenv/project/bin/pip install ipython </code></pre> <p>Now, when I run the python console in PyCharm it fails with the following error. (Interpreter in PyCharm is set to /path/to/sample_3/virtualenv/project/bin/python)</p> <pre><code>/path/to/sample_3/virtualenv/project/bin/pypy -u /Applications/PyCharm.app/helpers/pydev/pydevconsole.py 60355 60356 PyDev console: using IPython 0.13.2 Traceback (most recent call last): File "app_main.py", line 72, in run_toplevel File "/Applications/PyCharm.app/helpers/pydev/pydevconsole.py", line 361, in &lt;module&gt; StartServer(pydev_localhost.get_localhost(), int(port), int(client_port)) File "/Applications/PyCharm.app/helpers/pydev/pydevconsole.py", line 288, in StartServer interpreter = InterpreterInterface(host, client_port, threading.currentThread()) File "/Applications/PyCharm.app/helpers/pydev/pydev_ipython_console.py", line 37, in __init__ self.interpreter = PyDevFrontEnd() File "/Applications/PyCharm.app/helpers/pydev/pydev_ipython_console_011.py", line 35, in __init__ shell = TerminalInteractiveShell.instance() File "/path/to/sample_3/virtualenv/project/site-packages/IPython/config/configurable.py", line 318, in instance inst = cls(*args, **kwargs) File "/path/to/sample_3/virtualenv/project/site-packages/IPython/frontend/terminal/interactiveshell.py", line 360, in __init__ user_module=user_module, custom_exceptions=custom_exceptions File "/path/to/sample_3/virtualenv/project/site-packages/IPython/core/interactiveshell.py", line 454, in __init__ self.init_readline() File "/path/to/sample_3/virtualenv/project/site-packages/IPython/core/interactiveshell.py", line 1843, in init_readline self.refill_readline_hist() File "/path/to/sample_3/virtualenv/project/site-packages/IPython/core/interactiveshell.py", line 1851, in refill_readline_hist self.readline.clear_history() File "/tmp/pypy-2.0.2/lib_pypy/pyrepl/readline.py", line 284, in clear_history del self.get_reader().history[:] File "/tmp/pypy-2.0.2/lib_pypy/pyrepl/readline.py", line 188, in get_reader console = UnixConsole(self.f_in, self.f_out, encoding=ENCODING) File "/tmp/pypy-2.0.2/lib_pypy/pyrepl/unix_console.py", line 98, in __init__ curses.setupterm(term, self.output_fd) error: setupterm: could not find terminfo database Process finished with exit code 1 </code></pre> <p>Please be mindful that bin/python in any of the virtual environments points to the installed interpreter. For example, /path/to/sample_3/virtualenv/project/bin/python points to pypy and /path/to/sample_1/virtualenv/project/bin/python points to system installed python.</p> <p>Seems like this is related to <a href="http://ipython.org/faq.html#can-ipython-run-under-ironpython-pypy-jython-other-python-interpreters" rel="nofollow">this</a>. But, I am not sure.</p> <p>Please help.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload