1

I know anaconda is itself being used to set environment for different python versions, but i am trying to install the anaconda in virtual environment, so that my normal python setup, along with other packages ( like open-CV ,tensor flow , and CUDA and its dependencies ) shouldn't be affected,

{ initially i tried installing all these dependencies on anaconda, but it didn't seems to work for me, that's why i shifted back to normal version }

As i tried it, it installed the anaconda, but i don't now how, but i am able to access it outside of that virtual environment ( used virtualenv ), for now i have removed the anaconda It will be helpful if someone tell me correct alternatives for it,

2
  • As far as I understand it, you want to install Anaconda in such a way that your other Python installation (with whatever packages you have) are unaffected.Is that correct?
    – pineapple
    Jul 7, 2019 at 6:59
  • @pineapple yes sir, in that way, which i recently solved out
    – Transwert
    Jul 9, 2019 at 14:53

1 Answer 1

2

Anaconda is not intended to be installed in a virtual environment like virtualenv. It is meant to be its own virtual environment, more or less.

It is meant to be installed in your home directory for the local user(~/anaconda3 by default). From there, you will create the necessary virtual environments by creating separate conda environments (using the conda create... and conda activate... commands.

It does this by modifying your .bashrc and changing your $PATH to point to the isolated python installation.

You should follow the installation instructions as laid out in the installation guide for Linux.

If you want to continue to use your normal python environment, the installation procedure will allow you to opt out of having it modify your .bashrc and your $PATH will be unaffected.

In that case, you will enter your Anaconda environments by entering a command such as conda activate base for example . The Getting Started Guide provides a quick overview on managing your conda virtual environments.

4
  • [ "I does this by modifying your .bashrc and changing your $PATH to point to the isolated python installation. " ] as i am still noob in this, so how to change that path to isolated python installation, do you refer this python one, which is come as default one pre-installed or any other instance, and after changing does it means now i will have two separate environment, one with default python and other one which is python
    – Transwert
    Jul 7, 2019 at 9:47
  • @Transwert If, during the installation, you choose to not have your .bashrc modified, you will have an isolated Anaconda/Python installation. You will need to access your environments using 'conda activate...' commands. It is separate from your system python env. From there, you can create multiple python envs with multiple versions of python for your needs. Please read through the Installation and Getting Started guides. They do a great job of explaining how to manage this. All without impacting your main Python installation. Jul 7, 2019 at 9:57
  • thanks a lot sir, for answering, i just came to know about that, after reading through those guides, which you stated in your answer, as well as your latest comment
    – Transwert
    Jul 7, 2019 at 10:00
  • @Transwert You are welcome. If you work through the installation following the guide, many of your questions should be answered. It can be done very safely without worrying about breaking anything since this is all done in your home directory. They have very good documentation, in my experience. Jul 7, 2019 at 10:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .