Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
315 views
in Technique[技术] by (71.8m points)

python - How can i remove the effect of "pip3 install conda"?

I tried to install Conda on Kali Linux. I used the command $ pip3 install conda after that i try to run anaconda but nothing happen, so I go to the website and install the anaconda for linux64 then I install it successfully but when i run the script

$ source /home/faidey/anaconda3/bin/activate

$ conda init

The following message appears:

conda init
no change     /home/faidey/anaconda3/condabin/conda
no change     /home/faidey/anaconda3/bin/conda
no change     /home/faidey/anaconda3/bin/conda-env
no change     /home/faidey/anaconda3/bin/activate
no change     /home/faidey/anaconda3/bin/deactivate
no change     /home/faidey/anaconda3/etc/profile.d/conda.sh
no change     /home/faidey/anaconda3/etc/fish/conf.d/conda.fish
no change     /home/faidey/anaconda3/shell/condabin/Conda.psm1
no change     /home/faidey/anaconda3/shell/condabin/conda-hook.ps1
no change     /home/faidey/anaconda3/lib/python3.8/site-packages/xontrib/conda.xsh
no change     /home/faidey/anaconda3/etc/profile.d/conda.csh
no change     /home/faidey/.bashrc
No action taken.

So when I try to do the script $ sudo conda init the following message appears:

ERROR: The install method you used for conda--probably either `pip install conda`
or `easy_install conda`--is not compatible with using conda as an application.
If your intention is to install conda as a standalone application, currently
supported install methods include the Anaconda installer and the miniconda
installer.  You can download the miniconda installer from
https://conda.io/miniconda.html.

What can I do to remove the effect of first script $ pip3 install conda and run anaconda successfully?

question from:https://stackoverflow.com/questions/65865411/how-can-i-remove-the-effect-of-pip3-install-conda

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Which shell are you using? As the .bashrc is already modified by conda, you should be able to use conda as normal user. Maybe you have to restart the shell. If you are using zsh or another shell, you might have to modify the configuration manually.

If you really want to use conda as root user, you could try the following steps:

  1. You could try to remove the pip version of anaconda calling $pip3 uninstall conda. Now $conda init should work as root user. If not proceed with step 2.

  2. You could try to find out which binary is the correct one by calling $which conda as normal user and use the absolute path to initialize conda.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...