g-sherman / plugin_build_tool

Python command line tool for compiling and deploying QGIS plugins
GNU General Public License v2.0
38 stars 18 forks source link

Impossible to install on Windows 10 - Pygments dependency issue #11

Closed Guts closed 5 years ago

Guts commented 5 years ago

As mentioned in #10 , pip install pb_tool doesn't work on Windows 10 with QGIS 2.X LTR installed through OSGeo4W.

Here comes the trace from OSGeo shell:

run o-help for a list of available commands
C:\>pip install pb_tool
Collecting pb_tool
  Using cached https://files.pythonhosted.org/packages/c1/b4/b1ef4783d1ad850385635ef5ac96b532832ed9b0ce55eecf9b4c10460b20/pb_tool-2.0.1-py2-none-any.whl
Collecting Sphinx (from pb_tool)
  Using cached https://files.pythonhosted.org/packages/ff/d5/3a8727d6f890b1ae45da72a55bf8449e9f2c535a444923b338c3f509f203/Sphinx-1.8.2-py2.py3-none-any.whl
Collecting Click (from pb_tool)
  Using cached https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl
Requirement already satisfied: colorama in c:\osgeo4~1\apps\python27\lib\site-packages (from pb_tool) (0.3.9)
Requirement already satisfied: docutils>=0.11 in c:\osgeo4~1\apps\python27\lib\site-packages (from Sphinx->pb_tool) (0.14)
Requirement already satisfied: snowballstemmer>=1.1 in c:\osgeo4~1\apps\python27\lib\site-packages (from Sphinx->pb_tool) (1.2.1)
Requirement already satisfied: alabaster<0.8,>=0.7 in c:\osgeo4~1\apps\python27\lib\site-packages (from Sphinx->pb_tool) (0.7.12)
Requirement already satisfied: sphinxcontrib-websupport in c:\osgeo4~1\apps\python27\lib\site-packages (from Sphinx->pb_tool) (1.1.0)
Collecting Pygments>=2.0 (from Sphinx->pb_tool)
  Using cached https://files.pythonhosted.org/packages/fc/41/4f900a7852e25bb9350b4e3ee8c4aba0ee32abefd401456962b25f954823/Pygments-2.3.0-py2.py3-none-any.whl
Requirement already satisfied: six>=1.5 in c:\osgeo4~1\apps\python27\lib\site-packages (from Sphinx->pb_tool) (1.10.0)
Collecting imagesize (from Sphinx->pb_tool)
  Using cached https://files.pythonhosted.org/packages/fc/b6/aef66b4c52a6ad6ac18cf6ebc5731ed06d8c9ae4d3b2d9951f261150be67/imagesize-1.1.0-py2.py3-none-any.whl
Collecting typing; python_version < "3.5" (from Sphinx->pb_tool)
  Using cached https://files.pythonhosted.org/packages/cc/3e/29f92b7aeda5b078c86d14f550bf85cff809042e3429ace7af6193c3bc9f/typing-3.6.6-py2-none-any.whl
Collecting packaging (from Sphinx->pb_tool)
  Using cached https://files.pythonhosted.org/packages/89/d1/92e6df2e503a69df9faab187c684585f0136662c12bb1f36901d426f3fab/packaging-18.0-py2.py3-none-any.whl
Requirement already satisfied: Jinja2>=2.3 in c:\osgeo4~1\apps\python27\lib\site-packages\jinja2-2.7.2-py2.7.egg (from Sphinx->pb_tool) (2.7.2)
Requirement already satisfied: setuptools in c:\osgeo4~1\apps\python27\lib\site-packages (from Sphinx->pb_tool) (40.0.0)
Requirement already satisfied: requests>=2.0.0 in c:\osgeo4~1\apps\python27\lib\site-packages (from Sphinx->pb_tool) (2.18.4)
Collecting babel!=2.0,>=1.3 (from Sphinx->pb_tool)
  Using cached https://files.pythonhosted.org/packages/b8/ad/c6f60602d3ee3d92fbed87675b6fb6a6f9a38c223343ababdb44ba201f10/Babel-2.6.0-py2.py3-none-any.whl
Collecting pyparsing>=2.0.2 (from packaging->Sphinx->pb_tool)
  Using cached https://files.pythonhosted.org/packages/71/e8/6777f6624681c8b9701a8a0a5654f3eb56919a01a78e12bf3c73f5a3c714/pyparsing-2.3.0-py2.py3-none-any.whl
Requirement already satisfied: markupsafe in c:\osgeo4~1\apps\python27\lib\site-packages\markupsafe-0.23-py2.7-win-amd64.egg (from Jinja2>=2.3->Sphinx->pb_tool) (0.23)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in c:\osgeo4~1\apps\python27\lib\site-packages (from requests>=2.0.0->Sphinx->pb_tool) (1.22)
Requirement already satisfied: idna<2.7,>=2.5 in c:\osgeo4~1\apps\python27\lib\site-packages (from requests>=2.0.0->Sphinx->pb_tool) (2.6)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\osgeo4~1\apps\python27\lib\site-packages (from requests>=2.0.0->Sphinx->pb_tool) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in c:\osgeo4~1\apps\python27\lib\site-packages (from requests>=2.0.0->Sphinx->pb_tool) (2017.7.27.1)
Requirement already satisfied: pytz>=0a in c:\osgeo4~1\apps\python27\lib\site-packages (from babel!=2.0,>=1.3->Sphinx->pb_tool) (2017.2)
Installing collected packages: Pygments, imagesize, typing, pyparsing, packaging, babel, Sphinx, Click, pb-tool
  Found existing installation: Pygments 1.6
Cannot uninstall 'Pygments'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

C:\>pip --version
pip 18.1 from C:\OSGEO4~1\apps\Python27\lib\site-packages\pip (python 2.7)
g-sherman commented 5 years ago

What is the output of pip list ?

Guts commented 5 years ago
C:\>pip list
Package                       Version
----------------------------- -----------
alabaster                     0.7.12
astroid                       1.6.5
backports.functools-lru-cache 1.5
certifi                       2017.7.27.1
chardet                       3.0.4
colorama                      0.3.9
configparser                  3.5.0
docutils                      0.14
enum34                        1.1.6
future                        0.15.2
futures                       3.2.0
GDAL                          2.3.2
idna                          2.6
isort                         4.3.4
jinja2                        2.7.2
lazy-object-proxy             1.3.1
markupsafe                    0.23
mccabe                        0.6.1
numpy                         1.12.1+mkl
OWSLib                        0.14.0
pathlib2                      2.3.2
pip                           18.1
pipenv                        2018.7.1
psycopg2                      2.7.3.2
Pygments                      1.6
pylint                        1.9.3
pyproj                        1.9.5.1
python-dateutil               2.6.0
pytz                          2017.2
PyYAML                        3.12
requests                      2.18.4
scandir                       1.8
setuptools                    40.0.0
singledispatch                3.4.0.3
six                           1.10.0
snowballstemmer               1.2.1
sphinxcontrib-websupport      1.1.0
urllib3                       1.22
virtualenv                    16.0.0
virtualenv-clone              0.3.0
wheel                         0.31.1
wrapt                         1.10.11
g-sherman commented 5 years ago

Did you use the Standalone or Network Installer when you installed QGIS?

g-sherman commented 5 years ago

Try this: pip install --ignore-installed Pygments pb_tool

Guts commented 5 years ago

Did you use the Standalone or Network Installer when you installed QGIS?

As mentioned, through OSGeo4W installer (advanced mode with meta packages).

pip install --ignore-installed Pygments pb_tool

Works. Thanks for the workaround)

What the purpose of pygments in pb_tool?

g-sherman commented 5 years ago

Pygments is used for creating colored text output by the click module.

Guts commented 5 years ago

Ok thanks. I close.