WARNING: dot command dot cannot be run - python-sphinx

I am working on documentation for a software. And i have used graphviz directive inside my rest file.
.. graphviz::
:align: center
However when i run
make html
i get an error for dot command even though graphviz is installed in my virtenv (OS - mac). I have updated the conf.py to have the extension 'sphinx.ext.graphviz'
WARNING: dot command ‘dot’ cannot be run (needed for graphviz output), check the graphviz_dot setting

The problem could be referred to an incorrect configuration of "dot" executable from GraphViz PATH.
See: https://github.com/IQSS/dataverse/pull/7230
On my windows machine, I solved it following these steps:
Check if the dot installation has been performed, going in the installation path (the default installation path is: C:\Program Files (x86)\GraphvizX.XX\bin) and running here the command dot.exe
Go to Control Panel > System and Security > System, and on the right side navigation panel, click the Advanced systems settings link.
In Advance settings, a dialogue box opens that shows the Environment Variables button. Click the button.
Select the entry Path in the system variables section and add C:\Program Files (x86)\GraphvizX.XX\bin to the existing path.
I think the problem could be solved on your OS machine just adding the PATH using the export command, such as:
export PATH=$PATH:~/opt/bin
Ref: https://bobswift.atlassian.net/wiki/spaces/GVIZ/pages/20971549/How+to+install+Graphviz+software
https://osxdaily.com/2014/08/14/add-new-path-to-path-command-line/

It looks like Sphinx can't find dot executable. Make sure it's in your path.

Related

Install patch file in Redmine for windows

I want to install a patch file in Windows server for redmine. When executing in cmd:
patch -p0 < file.patch
I get the error: patch commmand not found
Any ideas?
Patch takes a patch file containing a difference listing produced by the diff program and applies those differences to one or more original files, producing patched versions.
It's native to unix/linux os-es, but for Windows, you need to install patch.exe and add it to system's or user's environment variable PATH
Probably best way is to install
http://gnuwin32.sourceforge.net/packages/patch.htm
On Windows it differs from version to version, but it looks somewhat like this:
From the desktop, right-click My Computer and click Properties.
In the System Properties window, click on the Advanced tab
In the Advanced section, click the Environment Variables button.
Then, in the Environment Variables window, edit the Path variable in the Systems Variable.
Add or modify the path lines with the paths you wish your console to access. Directories are separated with a semicolon as shown below.
C:\Program Files\; C:\Windows\System32
Example of path location in windows : C:\util\patch\

Protege-5.0.0-beta-23 is not showing OWLViz tab

I am using Protege-5.0.0-beta-23 on Windows machine. I have created an ontology. I would like to visualize my ontology with OWLViz. I have installed Graphviz and from Protege -> preferences I have setup Dot Application Path (C:\Program Files (x86)\Graphviz2.30\bin\dot.exe) properly. However still in Protege GUI, I do not see OWLViz tab. Please let me know how to fix it.
I am using protege5.0 on Ubuntu.But the setting is the same.You can modify tools menu item to show OWLViz. [Window]->[Tabs]->[OWLViz].
reference picture
Download instructions can be found in the link below but I've summarised the key steps to make it easier:
http://www.graphviz.org/download/
STEPS FOR MAC:
If you're on Mac, it's a pretty straightforward install - just open a terminal window and run one of these:
$ sudo port install graphviz
or
$ brew install graphviz
STEPS FOR WINDOWS:
Just head to the address below to download Graphviz and unzip and store the Graphviz folder within the Plugins folder in the Protege directory. Then make sure the Path to DOT application is referenced properly in Preferences > OWLViz tab > Path to DOT. Browse to where the dot.exe file is in the Graphviz folder that was unzipped to the Plugins folder
https://www2.graphviz.org/Packages/stable/windows/10/msbuild/Release/Win32/

Don't get GraphViz and phpDocumentor to work

I'm trying to create a php documentation on my local XAMPP host (on Windows 7) with phpDocumentor.phar (v2.). It gives me (after parsing all the files) this error:
Unable to find the dot command of the GraphViz package. Is GraphViz correctly installed and present in your path?
I searched a lot, but nothing helps. What does 'path' means? If I open a command box at any location I can start the dot.exe (which gives me no output but waiting prompt). In my environment path variable the bin folders is added. GraphViz is installed correct in Program Files and runs standalone.
What could I do or check?
In order to get GraphViz running properly with a Windows based phpdoc installation, just put the GraphViz program directory (c:\some\path\graphviz\release\bin) to the Windows Path system variable.
In order to do this, follow these steps (Win7, please provide your OS version if this doesn't apply to your situation):
From the desktop, right-click My Computer and click Properties.
In the System Properties window, click on the Advanced tab.
In the Advanced section, click the Environment Variables button.
In the Environment Variables window, highlight the Path variable in the Systems Variable section and click the Edit button.
Different directories are separated with a semicolon:
C:\Program Files;C:\Winnt;C:\Winnt\System32
It will most likely look a bit different in your enviroment, so please just take this for an example. Just add the GraphViz Path at the end like this:
C:\Program Files;C:\Winnt;C:\Winnt\System32;C:\somefolder\graphviz\release\bin
I'm not too sure if you have to reboot your system after changing this value. You had to do this in the old days of Win2k, and I just don't know if this still applies to modern Windows versions. It surely doesn't hurt!
After this, phpdoc should be able to find the dot command.
The steps to resolve this error are:
download Windows Packages from
https://graphviz.gitlab.io/_pages/Download/Download_windows.html
Just install it
add c:\Program Files\Graphviz*\dot.exe or c:\Program Files (x86)\Graphviz*\dot.exe to your environment variable PATH
run phpdoc
Re-start your machine & run phpdoc (if still shows the same error message)

Problems installing Python 27 on Windows 7 - cannot add Python to PYTHON PATH

I installed Python 2.7.3 on my Windows 7 computer using the binary, the first link. After installing it, IDLE works but nothing else recognizes Python. For example, typing python at the command prompt returns the message "'Python is not recognized as an internal or external command, operable program or bath file."
Following this post, I made sure that python 2.7 was in the PYTHONPATH environment variable. However, that didn't help.
What should I do?
PYTHONPATH system variable is used by Python itself to find directories with installed packages.
PATH system variable is used by OS (particularly Windows) to find executables which can open certain files like *.py scripts.
So, you need to add directory with python.exe (for example C:\Python27) to PATH system (or user) variable and not to PYTHONPATH. It can be done the same way as described in the link you've found in the same tool window.
For example on my machine PATH system variable is set to C:\Python27;C:\MinGW\bin;...
Like Vladimir commented, for setting up python in windows, you need to add the directory where your python.exe is located (for example C:\Python27) to PATH
You can confirm if python is in your environment variables by looking at the output of echo %path%
Keep in mind that after editing the PATH variable using the control panel, you have to open a new terminal, as the setting will NOT be updated in existing terminals.
Another possibility is that you added the wrong path to the PATH variable. Verify it.
The bottom line is, if the directory of your python.exe is really in PATH, then running python will really work.
Here are your steps:
Right-click Computer and select Properties.
In the dialog box, select Advanced System Settings.
In the next dialog, select Environment Variables. In the User Variables section, edit the PATH statement to include this:
C:\Python27;C:\Python27\Lib\site-packages\;C:\Python27\Scripts\;
Now, you can open a command prompt (Start Menu|Accessories or Start Menu|Run|cmd) and type:
C:\> python
That will load the Python interpreter!
You can install for single user rather than choosing the option of "Install for all users". I was facing the same issue, but when I tried installing just for myself, I was able to install successfully.

sass not recognised using Windows command shell

I've installed ruby and the sass gem on a Win 7 Enterprise box. I've had issues throughout the process, and had to download the gems and install them from local to avoid other issues.
gem install --local sass-3.1.19.gem
I'm trying sass --watch styles.sass:styles.css but I get the standard sass isn't recognised error from the command line.
I'm really new to ruby so I could well have missed a step.
Thanks in advance
In order to run commands without specifying full path, you need to have the path to the program in you PATH variable.
So if your program is located in C:\Programs\rubygems\gem\sass you'll need to add C:\Programs\rubygems\gem\ to PATH.
The process of adding a folder to PATH for the Windows command line prompt is described here.
For Windows Powershell, please check Setting Windows PowerShell path variable here on SO.
After installing sass with NPM you got this:
npm install -g sass
file:///C:/Users/yourName/AppData/Roaming/npm/sass ->
C:/Users/Administrador/AppData/Roaming/npm/node_modules/sass/sass.js
You can create the path. Go to environment variables - > system variables -> path -> Edith , and include file:///C:/Users/yourName/AppData/Roaming/npm/sass. Then, Accept everything. and it's done.
Yes, putting the path to my ruby bin did indeed solve this.
My Computer --> right click, Properties --> Advanced system settings (left hand column) --> Environment variables --> find Path in the bottom list, highlight and edit --> include ;c:\path-to-ruby\bin at the end --> OK back out through the windows.
Thanks!
If you using Windows 10 v1607 (latest update as March 2017), you need to follow following steps:
Right-click on start menu & select System
Click on Advanced System Settings (left hand column)
Click on Environment variables button
In top section, select Path (or PATH), then click on Edit button
Inside opened window, click on New button
In selected input area, type (for ex.) C:\Ruby22-x64\bin\ (its must be path to ruby's bin folder)
Click OK, twice
Re-open Command-Prompt, now sass is ready to watch and compile your sass files.
If you have Node installed use the node terminal instead of the windows/VSCode terminal.
Search for the Node terminal on the windows search tool placed on the right side of the windows start button.

Resources