Note that there are some explanatory texts on larger screens.

plurals
  1. POAcidentally deleted `/usr/bin/ipython` after `ImportError: No module named Shell` when running ipython from virtual environment
    primarykey
    data
    text
    <p><strong>Preface</strong></p> <p>I had a system-wide installation of Ipython which was working fine. However, when I was working in a virtual environment and had to install ipython there, running it from there gave the following error: </p> <pre><code>File "/usr/bin/ipython", line 26, in &lt;module&gt; import IPython.Shell ImportError: No module named Shell </code></pre> <p><strong>Current problem</strong></p> <p>Unfortunately I accidently removed the <code>ipython</code> file in <code>/usr/bin</code>. So calling <code>ipython</code> from inside or outside the virtual environment now gives this error:</p> <pre><code>bash: /usr/bin/ipython: No such file or directory </code></pre> <p>The following ipython-related files are currently in <code>/usr/bin</code>:</p> <pre><code>/usr/bin$ find ipython* ipython2.6 ipython2.7 ipython-wx ipythonx </code></pre> <p>If I remove all these files, will a fresh system-wide ipython install reinstall these files? (I have my doubts since I reinstalled it and it didn't add the deleted <code>ipython</code> file. in <code>/usr/bin</code>)</p> <p>What should I do to fix this?</p> <p><strong>Extra info</strong></p> <p>I am using python2.7</p> <p><strong>Edit</strong></p> <p>When I replace the first line of the new <code>/usr/bin/ipython</code> file to <code>#!/usr/bin/python</code> as Monir suggested I get this error:</p> <pre><code>Traceback (most recent call last): File "/usr/bin/ipython", line 5, in &lt;module&gt; from pkg_resources import load_entry_point File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2676, in &lt;module&gt; parse_requirements(__requires__), Environment() File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 552, in resolve raise DistributionNotFound(req) pkg_resources.DistributionNotFound: ipython==0.13.1 </code></pre>
    singulars
    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.
 

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