简体   繁体   中英

Anaconda installation; getting it right the first time

I've been using Enthought Canopy as my python environment for about a year now. Canopy is great because it's dedicated terminal makes installing packages with the right dependencies a breeze using pip install .

I am using Canopy to support my use of iPython notebook (now Jupyter) and it has worked out fine. However, recently I've been running into lack of support for different packages that run in python 2.x - which canopy is restricted to.

I'm now considering switching to Anaconda. A quick search on stackoverflow shows multiple threads about problems with dependencies, and one thread about how to safely uninstall Anaconda.

Thus, I would like to dedicate this thread to how one actually gets a Anaconda installation right the first time from a non-programmer's point of view. Ie minimal interaction root and bash scripts etc.

Issues/questions:

  1. Does Anaconda have it's own terminal? If not how can I make sure that the packages I install have the right dependencies?
  2. I am on Macbook running iOS, how can I make sure that I'm not messing with the native python installation? I've had major issues with brew install before.
  3. After downloading Anaconda and installing, how do I make it my default iPython notebook (Jupyter) environment? Eg when I open a terminal and write " ipython notebook ", it will start the Anaconda dependent one.
  4. conda install does not recognise conda install rise to install Reveal.js . How can I use conda to install local packages?

I am hoping that people with experience/advice will link useful threads and links in the comments/answers here. Would be great if this thread was as used as the uninstalling Anaconda safely one.

  1. Anaconda will append(should be appended) itself to your PATH environment variable. When you type "python" or "ipythonnotebook" it will execute the anaconda installed versions.

  2. Anaconda creates a separate python installation. On OS X it will not interfere or communicate with your system python. The install path is /Users/username/anaconda/bin. Anaconda allows you to easily create additional virtual environments with different dependencies and package versions:

     conda create -n environment_name python=version_number
  3. Once installed and with Anaconda appended to your PATH if you run any python command it will execute the packages found in ~/anaconda/bin and ignore the system, or additional, python installation. This includes using pip as it is part of Anaconda installation.

  4. Conda is a package management system for Python, although some C and R packages have been added. Someone could create a wrapper for it and you can additionally use pip but again python packages are the main focus.

  1. Use [conda install] in your terminal. This relies on the package being hosted and compiled at PyPi ( link to documentation ).
  2. Partially answered by 1. Really try not to install anything unless you're using conda install .
  3. Find the Anaconda Launcher (in Anaconda folder) and start ipython-notebook from there. Alternatively write which python in a terminal to make sure that your Anaconda python is your default environment.
  4. It's possible to build your own conda compatible packages .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM