terryyin / translate-python

Online translation as a Python module & command line tool. No key, no authentication needed.
MIT License
732 stars 153 forks source link

Can not install on a windows 10 environment #56

Open robpedersendev opened 4 years ago

robpedersendev commented 4 years ago

I need some serious help. Im on the verge of punching my computer screen.

I am getting this error message (see screenshot) image

I have tried this in pycharm and vscode, neither work and both give same results.

When I am inside the pipenv shell environment for the project within the project folder, I can do pip3 install translate, it provides the error in the screenshot. Same with the terminal and python console in both Vscode and pycharm

I have installed visual studio (per the error instructions) and im getting nowhere.

Error Block

(test-ol2do7ia) (test) C:\Users\Robert\Desktop\Side Projects\Udemy\Master python zero to Mastery\projects\test>pip3 install translate
Collecting translate
  Using cached https://files.pythonhosted.org/packages/85/b2/2ea329a07bbc0c7227eef84ca89ffd6895e7ec237d6c0b26574d56103e53/translate-3.5.0-py2.py3-none-any.whl
Requirement already satisfied: pre-commit in c:\users\robert\.virtualenvs\test\lib\site-packages (from translate) (2.0.1)
Collecting tox (from translate)
  Using cached https://files.pythonhosted.org/packages/3a/21/aa738f33db84be2caf89fae9d868320f7fc004329dd681cec4056d08cf75/tox-3.14.5-py2.py3-none-any.whl
Collecting lxml (from translate)
  Using cached https://files.pythonhosted.org/packages/39/2b/0a66d5436f237aff76b91e68b4d8c041d145ad0a2cdeefe2c42f76ba2857/lxml-4.5.0.tar.gz
Requirement already satisfied: requests in c:\users\robert\.virtualenvs\test\lib\site-packages (from translate) (2.22.0)
Requirement already satisfied: click in c:\users\robert\.virtualenvs\test\lib\site-packages (from translate) (7.0)
Requirement already satisfied: cfgv>=2.0.0 in c:\users\robert\.virtualenvs\test\lib\site-packages (from pre-commit->translate) (3.0.0)
Requirement already satisfied: nodeenv>=0.11.1 in c:\users\robert\.virtualenvs\test\lib\site-packages (from pre-commit->translate) (1.3.5)
Requirement already satisfied: aspy.yaml in c:\users\robert\.virtualenvs\test\lib\site-packages (from pre-commit->translate) (1.3.0)
Requirement already satisfied: identify>=1.0.0 in c:\users\robert\.virtualenvs\test\lib\site-packages (from pre-commit->translate) (1.4.11)
Requirement already satisfied: virtualenv>=15.2 in c:\users\robert\.virtualenvs\test\lib\site-packages (from pre-commit->translate) (20.0.4)
Requirement already satisfied: pyyaml in c:\users\robert\.virtualenvs\test\lib\site-packages (from pre-commit->translate) (5.3)
Requirement already satisfied: toml in c:\users\robert\.virtualenvs\test\lib\site-packages (from pre-commit->translate) (0.10.0)
Collecting colorama>=0.4.1; platform_system == "Windows" (from tox->translate)
  Using cached https://files.pythonhosted.org/packages/c9/dc/45cdef1b4d119eb96316b3117e6d5708a08029992b2fee2c143c7a0a5cc5/colorama-0.4.3-py2.py3-none-any.whl
Collecting py<2,>=1.4.17 (from tox->translate)
  Using cached https://files.pythonhosted.org/packages/99/8d/21e1767c009211a62a8e3067280bfce76e89c9f876180308515942304d2d/py-1.8.1-py2.py3-none-any.whl
Collecting packaging>=14 (from tox->translate)
  Using cached https://files.pythonhosted.org/packages/98/42/87c585dd3b113c775e65fd6b8d9d0a43abe1819c471d7af702d4e01e9b20/packaging-20.1-py2.py3-none-any.whl
Requirement already satisfied: six<2,>=1.14.0 in c:\users\robert\.virtualenvs\test\lib\site-packages (from tox->translate) (1.14.0)
Requirement already satisfied: filelock<4,>=3.0.0 in c:\users\robert\.virtualenvs\test\lib\site-packages (from tox->translate) (3.0.12)
Collecting pluggy<1,>=0.12.0 (from tox->translate)
  Using cached https://files.pythonhosted.org/packages/a0/28/85c7aa31b80d150b772fbe4a229487bc6644da9ccb7e427dd8cc60cb8a62/pluggy-0.13.1-py2.py3-none-any.whl
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\users\robert\.virtualenvs\test\lib\site-packages (from requests->translate) (1.25.8)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\users\robert\.virtualenvs\test\lib\site-packages (from requests->translate) (3.0.4)
Requirement already satisfied: idna<2.9,>=2.5 in c:\users\robert\.virtualenvs\test\lib\site-packages (from requests->translate) (2.8)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\robert\.virtualenvs\test\lib\site-packages (from requests->translate) (2019.11.28)
Requirement already satisfied: appdirs<2,>=1.4.3 in c:\users\robert\.virtualenvs\test\lib\site-packages (from virtualenv>=15.2->pre-commit->translate) (1.4.3)
Requirement already satisfied: distlib<1,>=0.3.0 in c:\users\robert\.virtualenvs\test\lib\site-packages (from virtualenv>=15.2->pre-commit->translate) (0.3.0)
Collecting pyparsing>=2.0.2 (from packaging>=14->tox->translate)
  Using cached https://files.pythonhosted.org/packages/5d/bc/1e58593167fade7b544bfe9502a26dc860940a79ab306e651e7f13be68c2/pyparsing-2.4.6-py2.py3-none-any.whl
Installing collected packages: colorama, py, pyparsing, packaging, pluggy, tox, lxml, translate
  Running setup.py install for lxml ... error
    Complete output from command C:\Users\Robert\.virtualenvs\test\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Robert\\AppData\\Local\\Temp\\pip-install-kxiufpya\\lxml\\setup.py';f=getattr(tokenize, 'open', open)
(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Robert\AppData\Local\Temp\pip-record-t8dsz_vq\install-record.txt --single-version-externally-managed --compile --install-
headers C:\Users\Robert\.virtualenvs\test\include\site\python3.8\lxml:
    Building lxml version 4.5.0.
    Building without Cython.
    ERROR: b"'xslt-config' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n"
    ** make sure the development packages of libxml2 and libxslt are installed **

    Using build configuration of libxslt
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.8
    creating build\lib.win-amd64-3.8\lxml
    copying src\lxml\builder.py -> build\lib.win-amd64-3.8\lxml
    copying src\lxml\cssselect.py -> build\lib.win-amd64-3.8\lxml
    copying src\lxml\doctestcompare.py -> build\lib.win-amd64-3.8\lxml
    copying src\lxml\ElementInclude.py -> build\lib.win-amd64-3.8\lxml
    copying src\lxml\pyclasslookup.py -> build\lib.win-amd64-3.8\lxml
    copying src\lxml\sax.py -> build\lib.win-amd64-3.8\lxml
    copying src\lxml\usedoctest.py -> build\lib.win-amd64-3.8\lxml
    copying src\lxml\_elementpath.py -> build\lib.win-amd64-3.8\lxml
    copying src\lxml\__init__.py -> build\lib.win-amd64-3.8\lxml
    creating build\lib.win-amd64-3.8\lxml\includes
    copying src\lxml\includes\__init__.py -> build\lib.win-amd64-3.8\lxml\includes
    creating build\lib.win-amd64-3.8\lxml\html
    copying src\lxml\html\builder.py -> build\lib.win-amd64-3.8\lxml\html
    copying src\lxml\html\clean.py -> build\lib.win-amd64-3.8\lxml\html
    copying src\lxml\html\defs.py -> build\lib.win-amd64-3.8\lxml\html
    copying src\lxml\html\diff.py -> build\lib.win-amd64-3.8\lxml\html
    copying src\lxml\html\ElementSoup.py -> build\lib.win-amd64-3.8\lxml\html
    copying src\lxml\html\formfill.py -> build\lib.win-amd64-3.8\lxml\html
    copying src\lxml\html\html5parser.py -> build\lib.win-amd64-3.8\lxml\html
    copying src\lxml\html\soupparser.py -> build\lib.win-amd64-3.8\lxml\html
    copying src\lxml\html\usedoctest.py -> build\lib.win-amd64-3.8\lxml\html
    copying src\lxml\html\_diffcommand.py -> build\lib.win-amd64-3.8\lxml\html
    copying src\lxml\html\_html5builder.py -> build\lib.win-amd64-3.8\lxml\html
    copying src\lxml\html\_setmixin.py -> build\lib.win-amd64-3.8\lxml\html
    copying src\lxml\html\__init__.py -> build\lib.win-amd64-3.8\lxml\html
    creating build\lib.win-amd64-3.8\lxml\isoschematron
    copying src\lxml\isoschematron\__init__.py -> build\lib.win-amd64-3.8\lxml\isoschematron
    copying src\lxml\etree.h -> build\lib.win-amd64-3.8\lxml
    copying src\lxml\etree_api.h -> build\lib.win-amd64-3.8\lxml
    copying src\lxml\lxml.etree.h -> build\lib.win-amd64-3.8\lxml
    copying src\lxml\lxml.etree_api.h -> build\lib.win-amd64-3.8\lxml
    copying src\lxml\includes\c14n.pxd -> build\lib.win-amd64-3.8\lxml\includes
    copying src\lxml\includes\config.pxd -> build\lib.win-amd64-3.8\lxml\includes
    copying src\lxml\includes\dtdvalid.pxd -> build\lib.win-amd64-3.8\lxml\includes
    copying src\lxml\includes\etreepublic.pxd -> build\lib.win-amd64-3.8\lxml\includes
    copying src\lxml\includes\htmlparser.pxd -> build\lib.win-amd64-3.8\lxml\includes
    copying src\lxml\includes\relaxng.pxd -> build\lib.win-amd64-3.8\lxml\includes
    copying src\lxml\includes\schematron.pxd -> build\lib.win-amd64-3.8\lxml\includes
    copying src\lxml\includes\tree.pxd -> build\lib.win-amd64-3.8\lxml\includes
    copying src\lxml\includes\uri.pxd -> build\lib.win-amd64-3.8\lxml\includes
    copying src\lxml\includes\xinclude.pxd -> build\lib.win-amd64-3.8\lxml\includes
    copying src\lxml\includes\xmlerror.pxd -> build\lib.win-amd64-3.8\lxml\includes
    copying src\lxml\includes\xmlparser.pxd -> build\lib.win-amd64-3.8\lxml\includes
    copying src\lxml\includes\xmlschema.pxd -> build\lib.win-amd64-3.8\lxml\includes
    copying src\lxml\includes\xpath.pxd -> build\lib.win-amd64-3.8\lxml\includes
    copying src\lxml\includes\xslt.pxd -> build\lib.win-amd64-3.8\lxml\includes
    copying src\lxml\includes\__init__.pxd -> build\lib.win-amd64-3.8\lxml\includes
    copying src\lxml\includes\etree_defs.h -> build\lib.win-amd64-3.8\lxml\includes
    copying src\lxml\includes\lxml-version.h -> build\lib.win-amd64-3.8\lxml\includes
    creating build\lib.win-amd64-3.8\lxml\isoschematron\resources
    creating build\lib.win-amd64-3.8\lxml\isoschematron\resources\rng
    copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib.win-amd64-3.8\lxml\isoschematron\resources\rng
    creating build\lib.win-amd64-3.8\lxml\isoschematron\resources\xsl
    copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.win-amd64-3.8\lxml\isoschematron\resources\xsl
    copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.win-amd64-3.8\lxml\isoschematron\resources\xsl
    creating build\lib.win-amd64-3.8\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract_expand.xsl -> build\lib.win-amd64-3.8\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_include.xsl -> build\lib.win-amd64-3.8\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_message.xsl -> build\lib.win-amd64-3.8\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_skeleton_for_xslt1.xsl -> build\lib.win-amd64-3.8\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_for_xslt1.xsl -> build\lib.win-amd64-3.8\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -> build\lib.win-amd64-3.8\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    warning: build_py: byte-compiling is disabled, skipping.

    running build_ext
    building 'lxml.etree' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

    ----------------------------------------
Command "C:\Users\Robert\.virtualenvs\test\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Robert\\AppData\\Local\\Temp\\pip-install-kxiufpya\\lxml\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read()
.replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Robert\AppData\Local\Temp\pip-record-t8dsz_vq\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\Robert\
.virtualenvs\test\include\site\python3.8\lxml" failed with error code 1 in C:\Users\Robert\AppData\Local\Temp\pip-install-kxiufpya\lxml\
robpedersendev commented 4 years ago

I can install other packages just fine which tells me that this is a package issue, not a machine issue