# IPython : Repository versus Pip

**URL:** <https://discourse.jupyter.org/t/ipython-repository-versus-pip/2322>\
**Category:** General\
**Created:** [October 6, 2019, 3:47pm UTC](https://discourse.jupyter.org/t/ipython-repository-versus-pip/2322 "2019-10-06T15:47:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![j.arunmani](https://avatars.discourse-cdn.com/v4/letter/j/c5a1d2/32.png) [@j.arunmani](https://discourse.jupyter.org/u/j.arunmani)\
**Post date:** [October 6, 2019, 3:47pm UTC](https://discourse.jupyter.org/t/ipython-repository-versus-pip/2322/1 "2019-10-06T15:47:15Z")

</div>

Hi. I’m new to Github and Jupyter, so sorry for my mistakes.  
I installed Jupyter today using pip. And launched `jupyter lab` it was all fine, but my Python code didn’t run at all! I checked out many tutorials and docs available but nothing helped. If I press `Shift + Enter` in a cell, there was no output and actually my code in cell wasn’t given any syntax-highlight at all (like `print` wasn’t given green colour and strings weren’t given red colour etc.)

Frustrated, I quit Jupyter and saw that my Terminal has been throwing some errors. I tried to read them and it was like `import error : ipython... auto_prompt can't be imported <blah blah>` (Sorry I didn’t give much focus to the error) But I had a basic thought that it was something related to `ipython` itself, so I typed `ipython3` in my Terminal (which I had already installed using `apt` and been using for months) but this time, instead of running fine (as usual) it threw the same error Jupyter had.

Then I removed `ipython3` using `sudo apt remove ipython3` and installed it again using `pip3 install ipython --user` and everything now works fine and perfect !

So what I actually want to ask is, is there any difference in using the repository’s `ipython` and one given by `pip`??

---

<div class="post-metadata">

**Author:** ![minrk](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/minrk/32/13_2.png) [@minrk](https://discourse.jupyter.org/u/minrk)\
**Post date:** [October 8, 2019, 10:38am UTC](https://discourse.jupyter.org/t/ipython-repository-versus-pip/2322/2 "2019-10-08T10:38:56Z")

</div>

This sounds like a messed up PYTHONPATH caused by setuptools. It is possible to end up with the wrong version of packages being imported when a given package is installed with both apt and pip. The pip version _should_ have higher priority than apt, but this can get messed up.

You can try:

```
python3 -m site

```

to see your path. One of the common errors that old setuptools can introduce is putting packages in `/usr/lib` ahead of `/usr/local`, which is an old bug, but once introduced it doesn’t go away until you delete an `easy_install.pth` file.

In general, there are lots of ways for things to get confused when you have two different versions of one package installed, so it’s a good idea to try to only have one if something is getting mixed up.
