1

I used this User's guide

https://dot2tex.readthedocs.io/en/latest/

I download python-2.7.14.msi from https://docs.python.org/2.7/installing/index.html

I install python-2.7.14.msi

Add

;C:\python25

in Systemsteuerung>System>Erweiterte Systemeinstellung>Umgebungsvariablen>Systemvariablen>Path.

I download pyparsing-2.2.0.win32-py2.7 from https://sourceforge.net/projects/pyparsing/files/pyparsing/pyparsing-2.2.0/pyparsing-2.2.0.win32-py2.7.exe/download

I installed pyparsing-2.2.0.win32-py2.7

I download dot2tex-2.9.0.zip

I unzip dot2tex-2.9.0.zip to C:\Users\Laptop\Desktop\dot2tex-2.9.0

I try to use pip, this should work because I use the version 2.7.14 of python:

https://dot2tex.readthedocs.io/en/latest/installation_guide.html#using-pip-or-easy-install

I start python (command line)

C:\Python27\python.exe starts

I type in "pip install dot2tex" It shows:

>>> pip install dot2tex   
  File "<stdin>", line 1
    pip install dot2tex
              ^ SyntaxError: invalid syntax

What do I do wrong?

I start IDLE (Python GUI)

It shows:

"Python 2.7.14 Shell"

Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> LE

I load with

File>open...>Desktop>dot2tex-2.9.0>setup.py

the setupfile of dot2tex-2.9.0

I do "Run>Run Module"

It shows

========== RESTART: C:\Users\Laptop\Desktop\dot2tex-2.9.0\setup.py ==========
>>> 

I download graphviz-2.38.msi from https://graphviz.gitlab.io/_pages/Download/Download_windows.html

I install graphviz-2.38.msi

I add

;C:\Program Files\Graphviz2.38\bin

in Systemsteuerung>System>Erweiterte Systemeinstellung>Umgebungsvariablen>Systemvariablen>Path.

I open Command Promt

I type "D:>dot2tex a.dot"

It comes that the command "dot2tex" was not found.

What do I do wrong?

dot2texi
  • 11
  • 3

1 Answers1

0

One step at a time

you installed python 2.7 but say you added add ;c:\python25 I would expect different as you later show ;c:\python27

So check with> where /r \ python2.7 (if it dos not work with python2.7 then try just python but you should have both for later commands) and ensure path above = the folder as given back ALSO add scripts so in your case it may be

set path= c:\python27;c:\python27\scripts;%path%

or permanently add both to the system environment

Old question asked for dot2tex-2.9.0 but that was from 2014 the current is dot2tex-2.11.3.tar.gz which pip will download and install for you

Pip is usually called through Python so having added python to your path first update pip

>Python2.7 -m pip install --upgrade pip  

>Python2.7 -m pip install dot2tex  

you should see

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. Collecting dot2tex Downloading https://files.pythonhosted.org/packages/ca/9e/26e11dfd9762eda401181b4cf388de5421d4ccfdddef0ddc1a8c9256e072/dot2tex-2.11.3-py2.py3-none-any.whl Collecting pyparsing (from dot2tex) Downloading https://files.pythonhosted.org/packages/de/0a/001be530836743d8be6c2d85069f46fecf84ac6c18c7f5fb8125ee11d854/pyparsing-2.3.1-py2.py3-none-any.whl (61kB) 100% |################################| 71kB 508kB/s Installing collected packages: pyparsing, dot2tex The script dot2tex.exe is installed in 'c:\python27\Scripts' Successfully installed dot2tex-2.11.3 pyparsing-2.3.1

Now check with

D:>dot2tex --version
Dot2tex version 2.11.3