Don't get GraphViz and phpDocumentor to work - xampp

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)

Related

How to add Cargo to PATH required for pywinpty when deploying to Heroku?

I am getting the following error on Windows:
Cargo, the Rust package manager, is not installed or is not on PATH.
remote: This package requires Rust and Cargo to compile extensions.
I've installed Rust and cargo is in the path, but the problem persists. Does anybody know why this is happening?
Error message is the same as in this post.
Heroku's stack runs on Ubuntu. Cargo is required by pywinpty but that's a library required for communicating with Windows processes. You may need it for your local environment but you don't need it for Heroku. You should try removing pywinpty from your requirements.txt when you deploy to Heroku.
If you want a temporary solution
Open a command line prompt (cmd) and execute
path
that will show you the actual, current path. Inspect it to see whether the necessary directories are really absent. If they are, execute
path=%path%;directory you want to add;other directory you want to add
The path will be available in the command prompt for as long as it's open. If they are present, reboot the computer, the addition to the path may have been delayed after installation.
The permanent solution
For Win10 but I guess instructions are not very different for other flavors.
Open System properties, find Environment Variables. In the dialog that pops up you will see System Variables, among which you will see Path. Select it, click edit and add the directories you need via the New button. Close all popup boxes and reboot (always a good idea when Windows is stubborn ;-) )

WARNING: dot command dot cannot be run

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.

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\

Anaconda Packages

I have Anaconda installed on my computer but when I type a command in cmd I only get 'conda' is not recognized as an internal or external command,
operable program or batch file. What could be the problem? It's the same with pip.
I can see that it is installed in my settings.
So Anaconda should have added jupyter to your PATH automatically during the install if you selected that option as shown in the installation video, if you did not select it, you need to do this manually, here are the steps to do so:
1)go to mu cpmuter properties and click on ADVANCE SYSTEM SETTINGS
2)Select the Advanced tab.
3)Click the Environment Variables button.
4)Under System Variables, select Path, then click Edit.
You'll see a list of folders, as this example for my system shows something like:
C:\Program Files\Windows Resource Kits\Tools\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;
You will notice that each of these file paths are separated by a semicolon ;
You can add additional folders that you want to include in searches. In this case, you need to add Anaconda to your path, it will be something like: C:\Users\myusername\Anaconda2
Add that to the list, make sure your spacing is correct
You'll need to restart the processes (e.g., command prompt) that use the system path to see the added folders.
-----------------------------------------------------------------------------## YOU CAN ALSO AVOID THIS MANUAL PROCESS ##
ANOTHER METHOD is reinstall this and while doing this make sure of thing that is shown in the scr shot below
while installing the anaconda the dialogue box appears giving two options
add anaconda to my path enviorment variable
register anaconda as my default python version
select both of this options though system will not recommend this but you have to mark
thankyou!!
all the best!!
Open your Anaconda Prompt instead of just your command prompt. Then type "conda list," you should get the correct output. I suspect that you did not add Anaconda to your PATH during installation and that's why your regular command prompt won't recognize the conda commands.
Find where you anaconda is installed. Usually, it is under %USERPROFILE%\AppData.... You can set path using SETX PATH on CMD. e.g. I have installed anaconda3. It was installed in its default path.
e.g.
SETX PATH “%USERPROFILE%\AppData\Local\Continuum\Anaconda3; %USERPROFILE%\AppData\Local\Continuum\Anaconda3\Scripts”
If you do not know where anaconda was installed, you can open "Anaconda prompt" app. You can see the environment path to your anaconda [You can find "Anaconda prompt" using Search Windows.

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.

Resources