My question is like: (only for linux)
How to install ipdb with Anaconda on Windows?
On a linux miniconda2 system, I did the following:
cd ~/miniconda2/bin
easy_install ipdb
This installed:
~/miniconda2/lib/python2.7/site-packages/ipdb-0.9.0-py2.7.egg
ipdb was then present in the miniconda2/bin dir and I was able to use ipdb from the cmd line with no problems
I would guess anaconda will be very similar to miniconda and this approach should work for both
This approach was based on the answer given to your link to the similar windows based question. I had previously tried to install through conda with no luck, i.e.
$ conda install ipdb
Fetching package metadata: ....
Error: No packages found in current linux-64 channels matching: ipdb
You can search for this package on anaconda.org with
anaconda search -t conda ipdb
You may need to install the anaconda-client command line client with
conda install anaconda-client
Related
This may be a silly simple question, but I couldn't find an answer in the documentation of Anaconda or elsewhere. I am a bit of a noob when it comes to Python and I am trying to install a package. The problem is generalizable to other packages.
specs
I am working on a macOS Catalina (10.15.5) and using Anaconda as my python environment (python2.7).
problem
I am attempting to install the package pyLDAvis in my python environment, but the package isn't available on Anaconda's environment manager, and pip or conda install isn't working on the Spyder shell. Do pip and conda installs only work on the Anaconda Prompt? The problem is that I have read that the Anaconda Prompt only exists on Windows, and I am on mac. How could I install packages (pip, conda, or else) on Anaconda?
Am I missing something?
Any help or pointers to documentation would be great! Thanks
Assuming you have conda already installed and your shell is properly configured, you can activate the base environment via
conda activate
You can also create a new environment, see manage-environments docs.
For more information than given below, see manage-pkgs docs.
In case of conda, after your environment is activated, you can then install a package via conda install <package name>, e.g. the package numpy
conda install numpy
In case of pip, after your environment is activated, you can then install a package via pip install <package name>, e.g. the package numpy
pip install numpy
I only do this if the package is not available via a conda channel.
If the package is also not available via pip, you can download the source and set the package up your self. Usually the package author describes how to set up his/her package.
Thanks Stefan for the suggestion! I struggled a bit because although conda was "already installed", my shell was indeed not "properly configured." I am writing here my solution because it may be a recurring theme for macOS users and had an easy fix.
Starting with macOS Catalina, macOS uses zsh and not bash as the default shell, and so calling conda on zsh had no effect. The error message was: -zsh: conda: command not found. I solved this by changing the default shell to bash by running the following command: chsh -s /bin/bash.
Now that the shell and conda are properly configured, I managed to use conda activate as you suggested Stefan.
Finally, the package pyLDAvis could not be installed by conda install pyldavis but was installed with pip install pyldavis.
Solved!
I am trying to install pip packages inside Anaconda without success.
This is what I have tried
1) installation of pip in Anaconda in the base environment
(base) root#eris:/# conda install pip
2) installation of a package, e.g. nano, using pip
(base) root#eris:/# pip install nano
Unfortunately, when I call nano an error message says that nano command was not found.
When I run "conda list", in one output line I get
nano 0.10.0 pypi_0 pypi
This is what I get when I run "which -a pip"
/root/anaconda3/bin/pip
and this is what I get when I run "which -a python"
/root/anaconda3/bin/python
Simon
conda activate environt_name followed by pip install package_name should work and install the package in that specific environment (but only do it for packages that are not in a conda repository and use conda install otherwise).
Unfortunately, when I call nano an error message says that nano command was not found.
Beware that pip install nano will install the nano library from Pypi. From the output of conda list it seems that the library was installed. I have never used this library, but from its description in Pypi it is related to django and it does not seem to come with an executable. Don't confuse it with the nano text editor that comes with most linux distributions (the nano text editor needs to be installed using your distro package manager).
I am stuck on this installation of scikit-image (aka skimage). I tried multiple ways:
Installation from a git hub folder (using the requirements.txt)
Installation from a whl file
Installation with pip install scikit-image
All three trials failed during the import: import skimage
ImportError: cannot import name 'geometry'
It seems that scikit-image has not been built correctly.
Your install of scikit-image appears to be broken.
Try re-installing the package following the instructions at:
https://scikit-image.org/docs/stable/install.html
I went through internet but did not find solutions besides the ones above.
Does anyone went through that before?
One possibility seems to be to pip install with -egg, but I found that for Mac rather than Windows.
EDIT:
Hi everyone, so I found a solution but this is kind of very hard and I still don't understand why it did not work before.
I just:
uninstall anaconda
uninstall python
install python (3.8)
install Anaconda (I have trouble with Spyder now^^)
If you want to code for computer vision/Image processing/machine learning tasks, then it can be done in pycharm with conda environment very easily. There is no need to install python separately to run Anaconda.
First, download and install pycharm. Next, If you use windows then download Anaconda 64 bit python 3.7 version from here,
https://www.anaconda.com/distribution/#windows
You can find some details about managing environment and helpful links here,
How to create some environments for tensorflow in anaconda?
https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html
Create a conda environment first using Anaconda Prompt command line,
conda create -n cvenv python=3.7
Now activate that environment using. By default base is activated.
conda activate cvenv
Next, install the packages you want,
conda install -c conda-forge scikit-learn
conda install -c conda-forge scikit-image
conda install -c conda-forge pillow
conda install -c conda-forge opencv
I use conda-forge packages as they are more recent. Finally, open pycharm and create a new project by selecting existing python interpreter in conda environment. If none exists then select,
Browse > Add Python Interpreter > Conda Environment > Interpreter > Browse > Anaconda3 installation folder > envs folder > cvenv folder > Python.exe
You can test by creating a python file and writing import skimage.
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
I am trying to install celery using conda in my Miniconda python distribution. I am using PyCharm to manage my project and packages. I have set up the project to use python installed with miniconda as distribution. Trying to install celery from pycharm package manager gives me no results. As well as trying to install conda from command line. Is there a way to install celerey using conda? Is there a way to use both pip and conda in parallerl? Can this be done through PyCharm?I also have python 2.7.10 installed in my windows pc. So I have two python installments in my system one in
C:\Python27
and one in
C:\Miniconda2
conda install celery return the following
Fetching package metadata: ....
Error: No packages found in current win-64 channels matching: celery
You can search for this package on anaconda.org with
anaconda search -t conda celery
You may need to install the anaconda-client command line client with
conda install anaconda-client
You can check the URL.
https://anaconda.org/conda-forge/celery
conda install -c conda-forge celery=3.1.25
I don't think celery is available as a conda package. You can install with pip into a conda environment, yes. But if at all possible you want to try to stick to conda packages.