how to uninstall java-jdk after installing it using anaconda - python

I have installed Java through anaconda:
conda install -c bioconda java-jdk
how to uninstall it again. I tried pip unintall java; pip uninstall java-jdk, conda uninstall java and conda uninstall java-jdk and nothing worked out.
Any help is much appreciated!!

Try running first
conda list
to see the name of the packages you want to remove
then you can use
conda remove <package_name>
you can also try adding --force but it can cause some issues in the
environment.. so should be used with caution

Related

conda update conda does not update conda

I had some problems with anaconda, so I decided to uninstall and reinstall it.
To do that I used anaconda-clean and ran the following command:
rm -rf ~/opt/anaconda3
The version that was installed is 4.12.0 and I wanted to update to the most recent, 22.9.0, but whenever I run
conda update conda
or
conda update -n base conda
and check the version
conda --version
I keep getting 4.12.0
Is there a way to solve this or find out if something went wrong when I deleted/installed anaconda?
Thanks!
Lu
Running conda update conda will make a best-effort attempt to update your environment. Unfortunately, you may have packages installed that prevents the update.
You can alternatively try a more explicit install:
conda install -n base conda=22.9.0
If this still fails please open an issue at https://github.com/conda/conda so the conda team can help debug further.
You likely have an old version of python in your base env with dependancies preventing automatic python update.
Running conda update python may solve this problem.
alternatively, you can install a specific version of python explicitly e.g.,
conda install python=3.9

conda environment has module installed but it does not import [duplicate]

Just installed a package through anaconda (conda install graphviz), but ipython wouldn't find it.
I can see a graphviz folder in C:\Users\username\Anaconda\pkgs
But there's nothing in: C:\Users\username\Anaconda\Lib\site-packages
The graphviz conda package is no Python package. It simply puts the graphviz files into your virtual env's Library/ directory. Look e.g. for dot.exe in the Library/bin/ directory.
To install the graphviz Python package, you can use pip:
conda install pip and pip install graphviz.
Always prefer conda packages if they are available over pip packages. Search for the package you need (conda search pkgxy) and then install it (conda install pkgxy). If it is not available, you can always build your own conda packages or you can try anaconda.org for user-built packages.
Update Nov 25, 2018: There exists now a python-graphviz package at Anaconda.org which contains the Python interface for the graphviz tool. Simply install it with conda install python-graphviz.
(Thanks to wedran and g-kaklam for posting this solution and to endolith for notifying me).
Update May 26, 2022: According to the pygraphviz website, the conda-forge channel should be used: conda install -c conda-forge pygraphviz (thanks to ian-thompson)
On conda:
First install
conda install graphviz
Then the python-library for graphviz python-graphviz
gv_python is a dynamically loaded extension for python that provides
access to the graph facilities of graphviz.
conda install python-graphviz
There is also pydot package, which can parse and dump into DOT language, used by GraphViz
conda install pydot
for me the problem was solved by installing another supportive package.
so I installed graphviz package through anaconda
then I failed to import it
after that I installed a second package named python-graphviz also through anaconda
then I succeeded in importing graphviz module into my code
I hope this will help someone :)
You can actually install both packages at the same time. For me:
conda install -c anaconda graphviz python-graphviz
did the trick.
To install graphviz,
conda install -c anaconda graphviz
pip install graphviz
If conda command not found. Follow these:
export PATH=~/anaconda/bin:$PATH
conda --version # to check your conda version
Difference between conda and pip installation,refer this stackoverflow answer
I have followed the following steps and it worked fine for me.
1 . Download and install graphviz-2.38.msi from
https://graphviz.gitlab.io/_pages/Download/Download_windows.html
2 . Set the path variable
(a) Control Panel > System and Security > System > Advanced System Settings > Environment Variables > Path > Edit
(b) add 'C:\Program Files (x86)\Graphviz2.38\bin'
Graphviz is evidently included in Anaconda so as to be used with pydot or pydot-ng (both of which are included in Anaconda). You may want to consider using one of those instead of the 'graphviz' Python module.
For ubuntu users I recommend this way:
sudo apt-get install -y graphviz libgraphviz-dev
Remeber! If you are using jupyter notebook, please restart it after the installing. That's work for me.
Because the condition before is a static variate as below:
Check if tensorflow is activated in your terminal
first deactivate it using
conda deactivate
then use the command
conda install python-graphviz
and then install
conda install graphviz
this is solution for UBUNTU USERS :) CHEERS :)
This command works officially for python:
conda install -c conda-forge python-graphviz
run this:
conda install python-graphviz
I am using anaconda for the same.
I installed graphviz using conda install graphviz in anaconda prompt.
and then installed pip install graphviz in the same command prompt. It worked for me.
I tried this way and worked for me.
conda install -c anaconda graphviz
pip install graphviz

How do I install the "sparse_dot_topn" Package in Anaconda Installer?

I am trying to install the "sparse_dot_topn" package in Alibaba Cloud ECS instance. Firstly I tried to install it through the Anaconda installer.
conda install sparse_dot_topn
It throws like there is no package available
So I tried to install via pip
Pip install spare_dot_topn
But it throws me the following error
What am I missing? Please leave your suggestions
sparse_dot_topn requires Cython, try installing it this way:
pip install cython
pip install git+https://github.com/ing-bank/sparse_dot_topn.git
I have tried it first with pip install and failed. Then I tried within Anaconda terminal with the following comment and it was succesfull.
conda install -c conda-forge sparse_dot_topn

speedml not working with py-xgboost / conda installed py-xgboost is not recognized by pip

I have install py-xgboost from anaconda using:
conda install py-xgboost
where it is shown up when I run
conda list
conda env export
But from pip it doesnt show up:
pip freeze
Is there a way to make pip able to 'see' xg-boost that is installed from a conda package? The reason I need this is because I need speedml which has a dependency on xg-boost and speedml is only available to me from pip (the enterprise anaconda repo do not have speedml).
Thanks!!
This can actually be solved by using
--no-deps
as described in this SO question
So for example what I need is speedml but it requires xgboost then I create the conda environment, installed py-xgboostm, and run the following in same conda env.:
pip install speedml --no-dependencies
And afterwards speedml works!

Can conda coexist with pip?

Maybe is a stupid question but I would like to install a python package that is in conda but not in pip. This is the package:
https://wrf-python.readthedocs.io/en/latest/installation.html
I don't have conda installed. My concern is that can conda coexist with pip? In other words, if I install conda and install that package, I would be able to use it with all the packages that I already have installed in pip?
thanks
You can do this by running
conda config --add create_default_packages pip
and pip will be installed in any new environment.
But, the whole point of conda is for it to work better than pip, so I would suggest using conda instead of pip at all times.

Categories

Resources