New install error

104 views
Skip to first unread message

Mark Fitch

unread,
Jul 19, 2022, 8:04:08 PM7/19/22
to pretext...@googlegroups.com
I am installing pretext-cli on a coworker's computer. After running "pip install pretextbook" I get the following error. I'm not sure where the error is occurring (which module).

$ pretext --version
Traceback (most recent call last):
  File "C:\Users\maossiandergobeille\Anaconda3\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\maossiandergobeille\Anaconda3\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\maossiandergobeille\Anaconda3\Scripts\pretext.exe\__main__.py", line 4, in <module>
  File "C:\Users\maossiandergobeille\Anaconda3\lib\site-packages\pretext\cli.py", line 13, in <module>
    from . import utils, static, VERSION, CORE_COMMIT, core
  File "C:\Users\maossiandergobeille\Anaconda3\lib\site-packages\pretext\utils.py", line 16, in <module>
    from lxml import etree as ET
ImportError: DLL load failed while importing etree: The specified module could not be found.

--
Dr. Mark A. Fitch
Professor and Chair, Department of Mathematics & Statistics

maf...@uaa.alaska.edu
http://www.math.uaa.alaska.edu/~afmaf

SSB 154D
University of Alaska Anchorage
3211 Providence Drive, Anchorage, AK 99508

Oscar Levin

unread,
Jul 19, 2022, 8:30:45 PM7/19/22
to PreTeXt support
The error message makes it seem like lxml isn't installed correctly, which is strange since `pip install pretextbook` should require that.  Is Anaconda python the only version of python installed on the computer?

Try running `pip show lxml`, and while you are at it, `pip show pretextbook`.  Compare these to `python -m pip show lxml` and `python -m pip show pretextbook`.  Post the output here (all four if there are differences).

Oscar.

Mark Fitch

unread,
Jul 19, 2022, 8:40:44 PM7/19/22
to pretext...@googlegroups.com
Both version give the same output (copied below).

$ pip show lxml
Name: lxml
Version: 4.8.0
Summary: Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API.
Home-page: https://lxml.de/
Author: lxml dev team
Author-email: lxml...@lxml.de
License: BSD
Location: c:\users\maossiandergobeille\anaconda3\lib\site-packages
Requires:
Required-by: Scrapy, pretextbook, parsel

$ pip show pretextbook
Name: pretextbook
Version: 0.8.1
Summary: A package to author, build, and deploy PreTeXt projects.
Home-page:
Author: PreTeXtBook.org
Author-email: steven.clo...@gmail.com
License: GPL-3.0-or-later
Location: c:\users\maossiandergobeille\anaconda3\lib\site-packages
Requires: click, watchdog, click-logging, lxml, pdfCropMargins, ghp-import, GitPython, requests, single-version
Required-by:

$ python -m pip show lxml
Name: lxml
Version: 4.8.0
Summary: Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API.
Home-page: https://lxml.de/
Author: lxml dev team
Author-email: lxml...@lxml.de
License: BSD
Location: c:\users\maossiandergobeille\anaconda3\lib\site-packages
Requires:
Required-by: Scrapy, pretextbook, parsel

$ python -m pip show pretextbook
Name: pretextbook
Version: 0.8.1
Summary: A package to author, build, and deploy PreTeXt projects.
Home-page:
Author: PreTeXtBook.org
Author-email: steven.clo...@gmail.com
License: GPL-3.0-or-later
Location: c:\users\maossiandergobeille\anaconda3\lib\site-packages
Requires: single-version, GitPython, lxml, watchdog, requests, click-logging, pdfCropMargins, click, ghp-import
Required-by:

--
You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/408f3e93-2ca7-400d-98fc-d697fe54d67an%40googlegroups.com.

Mark Fitch

unread,
Jul 19, 2022, 8:41:51 PM7/19/22
to pretext...@googlegroups.com
Okay, I ran
pip uninstall lxml
pip install lxml
Now pretextbook --version runs fine
Reply all
Reply to author
Forward
0 new messages