Question

I recently installed ipython, and along with it, anaconda. However, anaconda changed my sys.path directories, and some of the packages I was using before stopped working. Even after uninstalling anaconda using pip, it seems that those directories remained. How do I change them back? When I enter the python shell, I do and see the following:

enter image description here

Was it helpful?

Solution

Anaconda installs its own Python. When you run that Python, it uses the Anaconda Python libraries. The Anaconda installer put a line in your .profile that makes it first in the PATH, so that when you type python, it loads the Anaconda Python.

If you want to use the Python packages that you had installed into another Python with Anaconda, you will need to install them, using conda (or pip if they are not available via conda)

OTHER TIPS

Anaconda is a separate python environment and as such doesn't have access to anything you installed in the base python environment. Depending on the project is usually a good idea to have separate environments using virtualenv or a similar tool. You can also do this using Anconda as described below.

  1. Create a virtual environment for your project

    conda create -n yourenvname python=x.x anaconda

  2. Activate your virtual environment

    source activate yourenvname

  3. Install additional Python packages to a virtual environment.

    conda install -n yourenvname [package]

Full description can be found at http://uoa-eresearch.github.io/eresearch-cookbook/recipe/2014/11/20/conda/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top