I tried outputting one of my DiGraphs as follows:
A=nx.drawing.nx_agraph.to_agraph(Graph)
nx.drawing.nx_agraph.write_dot(dot_filename)
However I got :
ImportError: ('requires pygraphviz ', 'http://pygraphviz.github.io/')
Anaconda command windows says
graphviz 2.38.0 0 is already installed..
Can anybody help who managed to use Graphviz through Anaconda?
You can try this:
conda install -c pdrops pygraphviz=1.2
Check conda pygraphviz package availability for your system. Previous answer seems to be a package available just for linux & osx 64. Give a try to
conda install -c marufr pygraphviz=1.3.1
this version shows in the details to be compatible with win32 & 64 as well as with linux and osx. You can find more packages from any user typing
conda install -c binstar binstar
Afterthat, for instance, to find all the pygraphviz packages in public channels code
binstar search -t conda pygraphviz
Finally find your platform compatible and install from command line as usual.
Related
after following the instruction in http://docs.h2o.ai/h2o/latest-stable/h2o-docs/downloading.html#install-in-python, I was able to install h2o v 3.16.0.2. I was also able to use command line instructions mentioned in the above website and test that it is working.
python
import h2o
h2o.init()
h2o.demo("glm")
However, when I launch anaconda spyder, I am not able to import h2o. How do I link the h2o I have installed and bring it into Spyder python?
Update:
I have already tried {conda install -c anaconda h2o } which is mentioned on Anaconda.org, but that installs older ver 3.10 of h2o and that did not work either.
thanks for your help.
I believe the problem is due to your python environment. When you install Anaconda, you need to use anaconda pip, to ensure that the installed packages are available in conda.
The short answer is you can install the lastest stable version of H2O (3.16.0.2 as of today) using conda via h2oai channel instead of anaconda channel (h2o maintains it's own channel):
conda install -c h2oai h2o
this should solve your issue.
But more generally, the packages will appear in conda if you use anaconda pip. You can check which pip is being used by doing
which pip
and making sure that the path to the pip is within your anaconda distribution; something like /home/<userdir>/anaconda/bin/pip instead of /usr/bin/pip
Same is true also for Python. Try checking if starting Python in terminal points to anaconda Python by doing which python. If that's not the case, than you would need to add the conda installation of Python to your PATH variable. Please refer to conda docs for instructions https://conda.io/docs/user-guide/install/index.html
It would have been helpful if you had included information regarding your operating system in the question.
I'm using python 3.6.3 on a windows 10 machine. I installed pydot and graphviz using pip install via:
py -m pip install pydot
py -m pip install graphviz
I also went to the graphviz website and downloaded and installed the windows version here: http://www.graphviz.org/Download_windows.php which default installed to program files(x86). But when I go to plot my model in keras, I still get the error saying I have to install pydot and graphviz and that the import failed. I can do
import pydot
import graphviz
on my python console just fine, they throw no errors. What else should I do to be able to graph my neural net?
The path(s) to the installed GraphViz executables (dot, neato, etc.) need to be in the PATH environment variable, in order for pydot to find them. pydot used to search for those executables in earlier versions, but not any more.
Also:
pydot is a Python package.
GraphViz is a collection of tools written in C for computing graph layouts
graphviz is a Python package entirely unrelated to pydot. These two Python packages do not interact in any way with each other. Installing one of them should suffice (together with GraphViz).
See also:
https://github.com/erocarrera/pydot/issues/126
https://github.com/erocarrera/pydot/commit/812e3c40dac1e0225391481073c64da5bafba93e#commitcomment-18236709
https://github.com/erocarrera/pydot/commit/812e3c40dac1e0225391481073c64da5bafba93e#commitcomment-18222580
and links from there.
Complementing #Ioannis answer, you have to install GraphViz executables via conda (conda install GraphViz).
For my case, after installing GraphViz I tried with the latest pydot (pip install pydot) and the error was resolved.
Just to complete the #dataLeo 's solution, Python 3 users can use pydotplus package instead of pydot-ng package. To summarize:
install pydot+graphviz and pydotplus by commands "conda install pydot" and "conda install -c conda-forge pydotplus".
Go to the vis_utils.py file and change line 11 from import pydot to
import pydotplus as pydot.
PS: You can locate the vis_utils.py file by checking help for plot_model command in ipython console, i.e. after from keras.utils import plot_model, type ??plot_model in ipython console.
Tested on Windows 10-64 bit with Anaconda python-3.6
I solved this problem by installing the packages with :
conda install graphviz
conda install pydot
conda install pydotplus
environments: Ubuntu 14.04(64bit) Python2.7.11
Firstly, I installed tensorflow in the way of Virtualenz installation.
$ sudo apt-get install python-pip python-dev python-virtualenv
$ virtualenv --system-site-packages ~/tensorflow
$ source ~/tensorflow/bin/activate
$export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.1-cp27-none-linux_x86_64.whl
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-0.12.1-cp27-none-linux_x86_64.whl
$ pip install --upgrade $TF_BINARY_URL
and then, I test my installation and some issue appear. I know I didn't install tensorflow successfully.
import tensorflow
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named tensorflow
import tensorflow as tf
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named tensorflow
I don't know how to solve the problem. Please help me, it cost me one day. I tried to uninstall tensorflow and then I installed in the way of pip installation. But I get the same error.
The protocbuf is 3.1.0.
Are you running python in the same virtual environment you installed tensorflow in?
To access your tensorflow installation, you have to first "activate" the virtualenv in any new terminals, as follows:
source ~/tensorflow/bin/activate
python
import tensorflow as tf
If you run the above in a new terminal, does it solve your problem?
When you did
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-0.12.1-cp27-none-linux_x86_64.whl
this step you are specifying that you are going to use Nvidia card.
To run tensorflow with GPU(Nvidia graphics card) you need to satisfy all Nvidia requirements
Nvidia requires some special privileges to its CUDA cores
You also need to check for Cuda pathnames to the LD_LIBRARY_PATH environment variable, check in Nvidia Documentation.Also, you need to install an profiling support, this can be done by libcupti-dev library, which is the NVIDIA CUDA Profile Tools Interface. This library provides advanced profiling support. To install this library, issue the following command:
sudo apt-get install libcupti-dev
But if you want to run tensorflow in CPU mode only, do not specify $ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-0.12.1-cp27-none-linux_x86_64.whl.With this you are overriding TF_BINARY_URL variable to use Nvidia CUDA core
So, to use CPU from all your steps remove $ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-0.12.1-cp27-none-linux_x86_64.whl and include only $export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.1-cp27-none-linux_x86_64.whl and reinstall
I hope this should clear the problem
In case, your prerequisite python packages are not installed properly,
check several things.
$ source $HOME/tensorflow/bin/activate
$ which python
$ which pip
please check these binaries are in the path $HOME/tensorflow/bin/activate. If so, try
$ pip install -I --upgrade $TF_BINARY_URL
where -I option forces to install packages.
INSTALLATION OF TENSORFLOW ON UBUNTU 18.04
download anaconda python package
install it via shell using bash
$bash anaconda*.sh
editing the .bashrc script //location home
$sudo apt-get install python3-pip
$sudo apt-get update
$cd
$nano .bashrc
nano is the text editor
insert the given line at the end of the file
export PATH=-/anaconda3/bin:$PATH
create a virtual environment
using conda
$conda create -n myenv python=3.5
//SPECIFY THE VERSION REQUIRED DO NOT USE 3.7 AS THERE IS A COMPATIBLITY ISSUE WITH TENSORFLOW 10
$source activate myenv
$pip install -U tensorflow
$python
>>import tensorflow as tf
>> //get this prompt without an error it means the installation is successful
>>exit()
source deactivate
fully tested if an issue arises do let me know
whenever you install python packages i would suggest to do it in a virtual environment
I'm trying to install Theano on windows with Anaconda and I'm stuck at the "Configuring the Environment" step. The instructions here say: The script assumes that you installed WinPython distribution, update the winpython line otherwise. The line in question is
CALL %SCISOFT%\WinPython-64bit-2.7.9.4\scripts\env.bat
What am I supposed to change this to if I'm using Anaconda instead of WinPython?
It's easy to install "Theano on Windows with Anaconda"
After Anaconda is installed:
$ conda install mingw libpython
$ pip install theano
Then maybe, you needn't do anything else, just test it.
The dedicated Anaconda paragraph is not correct ?
http://deeplearning.net/software/theano/install_windows.html#alternative-anaconda
I am using the Anaconda python distribution for 64 bit, windows
https://store.continuum.io/cshop/anaconda/
I am now trying to do some genetic search, and tried to install Pyevolve
http://pyevolve.sourceforge.net/
Unfortunately it crapped out saying
"Python 2.6 not found in registry"
I do have Python 2.7.6 through Anaconda. Any way around the issue? Thanks.
I managed it using binstar:
Look for available packages: binstar search -t conda pyevolve (two packages found OpenMDAO/pyevolve and greole/pyevolve)
Ask for details of chosen package: binstar show openmdao/pyevolve (install link given)
Install package: conda install --channel https://conda.anaconda.org/OpenMDAO pyevolve
Enjoy working with pyevolve!
My system: Win8, 64-bit, Python 2.7.8, Anaconda 2.1.0 (32-bit).
Anaconda suggests using "conda" for package management. There are some package not available in its repository. You can try command below:
conda search Pyevolve
Pyevolve seems depend on Python 2.6, you can try conda to setup a new environment in 2.6 version.