New to QGIS and Python. Have QGIS installed and working great on Windows, want to install and use Docutils -- Python Documentation Utilities (presumably all simple and small .py programs).
I see that QGIS has a Python Console built in. Do I just use that? What is the command line to run install.py?
QGIS obviously installed Python. However, it looks like the customary path variables were not set during the QGIS install, such that Python can be run from a windows command (cmd.exe) window.
That seems to be the task here, so I proceed to try to enable Python to run independent of QGIS.
First, I search for python.exe. I find it at: C:\Program Files\QGIS Lyon\bin
So I set the windows path variable to include that.
After searching (and a lot of confusion as to where the Python distribution actually is, is it standard, or is it custom, questions as to how libraries, etc are laid out, and noting it's all installed "underneath" C:\Program Files\QGIS Lyon) so it appears custom(?) Will I break that by using it for "generalized" Python programs?
I try the following environmental values:
PYTHONPATH
C:\Program Files\QGIS Lyon\apps\Python27\Lib
PYTHONHOME
C:\Program Files\QGIS Lyon\bin
Have no idea if those are even close to correct. I then run the install for docutils
C:\Users\rick\Desktop\docutils-0.12>python install.py
Program starts, but then errors per below.
Seems like a "documentation utility" should be a snap to install. Plus there probably a straightforward way to run Python programs independent of QGIS? I also note an additional install of Python with Inkscape (a vector drawing program used in the QGIS training manual.) So already two installations of Python on the system already. (Correction, three installations. FWTools has yet another Python install.)
If a user wants to run Python programs (such as docutils and other small learning programs) should they download a fresh Python "stand alone" install? (looks like on this machine that would be the 4th install?)
errors
C:\Users\rick\Desktop\docutils-0.12>python install.py
This is a quick & dirty installation shortcut. It is equivalent to the command::
python setup.py install
However, the shortcut lacks error checking and command-line option processing. If you need any kind of customization or help, please use one of::
python setup.py install --help
python setup.py --help
Traceback (most recent call last):
File "install.py", line 27, in <module>
dist.run_commands()
File "C:\Program Files\QGIS Lyon\apps\Python27\Lib\distutils\dist.py", line 95
3, in run_commands
self.run_command(cmd)
File "C:\Program Files\QGIS Lyon\apps\Python27\Lib\distutils\dist.py", line 97
2, in run_command
cmd_obj.run()
File "C:\Program Files\QGIS Lyon\apps\Python27\Lib\distutils\command\install.p
y", line 575, in run
self.run_command(cmd_name)
File "C:\Program Files\QGIS Lyon\apps\Python27\Lib\distutils\cmd.py", line 326
, in run_command
self.distribution.run_command(command)
File "C:\Program Files\QGIS Lyon\apps\Python27\Lib\distutils\dist.py", line 97
2, in run_command
cmd_obj.run()
File "C:\Program Files\QGIS Lyon\apps\Python27\Lib\distutils\command\install_l
ib.py", line 97, in run
outfiles = self.install()
File "C:\Program Files\QGIS Lyon\apps\Python27\Lib\distutils\command\install_l
ib.py", line 115, in install
outfiles = self.copy_tree(self.build_dir, self.install_dir)
File "C:\Program Files\QGIS Lyon\apps\Python27\Lib\distutils\cmd.py", line 377
, in copy_tree
dry_run=self.dry_run)
File "C:\Program Files\QGIS Lyon\apps\Python27\Lib\distutils\dir_util.py", lin
e 139, in copy_tree
mkpath(dst, verbose=verbose)
File "C:\Program Files\QGIS Lyon\apps\Python27\Lib\distutils\dir_util.py", lin
e 76, in mkpath
"could not create '%s': %s" % (head, exc.args[-1]))
distutils.errors.DistutilsFileError: could not create 'C:\Program Files\QGIS Lyo
n\bin\Lib': Access is denied