Upgrading from 1.6.0 to newest (1.7.5) fails

21 views
Skip to first unread message

OHappyDay

unread,
Aug 28, 2023, 11:33:22 AMAug 28
to PreTeXt support
Hi,
today I wanted to upgrade my existing and working installation from 1.6.0 to 1.7.5.

It fails.

- pip install --upgrade pretext results in an error: ERROR: pretextbook 0.8.3 has requirement watchdog<3,>=2, but you'll have watchdog 3.0.0 which is incompatible.

- running the command again removes the error message but running pretext fails (see log below).

Reinstalling 1.6.0 succeeds but I am lost how to upgrade (I am on Ubuntu 20.04)

Installing dataclasses (pip install dataclasses) does not change anything.

Can someone help?


Thanks
Klaus

Traceback (most recent call last):
 File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
   return _run_code(code, main_globals, None,
 File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
   exec(code, run_globals)
 File "/home/klaus/.local/lib/python3.8/site-packages/pretext/__main__.py", line 1, in <module>
   from .cli import main
 File "/home/klaus/.local/lib/python3.8/site-packages/pretext/cli.py", line 28, in <module>
   from .project import Project
 File "/home/klaus/.local/lib/python3.8/site-packages/pretext/project/__init__.py", line 9, in <module>
   from .. import build as builder
 File "/home/klaus/.local/lib/python3.8/site-packages/pretext/build.py", line 8, in <module>
   from .project.xml import Executables
 File "/home/klaus/.local/lib/python3.8/site-packages/pretext/project/xml.py", line 4, in <module>
   import pydantic_xml as pxml
 File "/home/klaus/.local/lib/python3.8/site-packages/pydantic_xml/__init__.py", line 7, in <module>
   from .model import BaseGenericXmlModel, BaseXmlModel, XmlAttributeInfo, XmlElementInfo, XmlWrapperInfo, attr, element
 File "/home/klaus/.local/lib/python3.8/site-packages/pydantic_xml/model.py", line 5, in <module>
   import pydantic as pd
 File "pydantic/__init__.py", line 2, in init pydantic.__init__
 File "pydantic/dataclasses.py", line 41, in init pydantic.dataclasses
   # +---------+-----------------------------------------+
ImportError: cannot import name dataclass_transform


Oscar Levin

unread,
Aug 28, 2023, 11:39:14 AMAug 28
to PreTeXt support
That you have a message about `pretextbook` suggests you may have never properly upgraded from the pre-1.0 release.  Try `pip uninstall pretextbook`, and then uninstall `pretext` using `pip uninstall pretext`.  Then run a `pip install --upgrade pretext` to see if that fixes it.

If this doesn't work, try `pip list` to see if anything strange regarding pretext is showing up.

OHappyDay

unread,
Aug 28, 2023, 3:31:40 PMAug 28
to PreTeXt support
Hi Oscar,

I did uninstall pretextbook, uninstalled pretext and installed pretext again. Same error message (ImportError: cannot import name dataclass_transform
)
Installing 1.6.0 works fine and it runs as expected.

pip list gives me:

I cannot see anything special.
Thanks
Klaus


Package                  Version              Location                            
------------------------ -------------------- -------------------------------------
absl-py                  0.11.0              
addict                   2.4.0                
appdirs                  1.4.4                
astropy                  4.0                  
atomicwrites             1.1.5                
attrs                    19.3.0              
basicsr                  1.4.1                
beautifulsoup4           4.8.2                
bitarray                 1.6.3                
blessings                1.7                  
blinker                  1.4                  
bottle                   0.12.23              
brial                    1.0.2                
Brlapi                   0.7.0                
butterfly                3.2.5                
cachetools               5.2.0                
catfish                  1.4.13              
certifi                  2020.12.5            
cffi                     1.14.5              
chardet                  4.0.0                
charset-normalizer       2.0.12              
chess                    1.4.0                
chrome-gnome-shell       0.0.0                
click                    8.1.3                
click-log                0.4.0                
click-logging            1.0.1                
CodeChat                 1.9.2                
CodeChat-Server          0.2.9                
colorama                 0.4.3                
colorlog                 5.0.1                
commonmark               0.9.1                
configobj                5.0.6                
cryptography             3.4.6                
cupshelpers              1.0                  
cycler                   0.10.0              
cymruwhois               1.6                  
dataclasses              0.6                  
dbus-python              1.2.16              
decorator                4.4.2                
defer                    1.0.6                
distlib                  0.3.0                
distro                   1.4.0                
distro-info              0.23+ubuntu1.1      
dnsdiag                  1.7.0                
dnspython                1.16.0              
docutils                 0.19                
ECPy                     1.2.5                
entrypoints              0.3                  
ExifRead                 2.1.2                
facexlib                 0.2.4                
fileinit                 0.0.2                
filelock                 3.0.12              
filterpy                 1.4.5                
future                   0.18.2              
gfpgan                   1.3.4                
ghp-import               2.1.0                
gitdb                    4.0.9                
GitPython                3.1.24              
google-auth              2.9.1                
google-auth-oauthlib     0.4.6                
gpg                      1.13.1              
gpustat                  0.6.0                
greenlet                 2.0.1                
grpcio                   1.47.0              
html5lib                 1.0.1                
httplib2                 0.14.0              
hypothesis               4.36.2              
idna                     2.10                
imageio                  2.21.0              
importlib-metadata       4.12.0              
keyring                  18.0.1              
kiwisolver               1.3.1                
language-selector        0.1                  
launchpadlib             1.10.13              
lazr.restfulclient       0.14.2              
lazr.uri                 1.0.3                
llvmlite                 0.39.0              
lmdb                     1.3.0                
louis                    3.12.0              
lxml                     4.9.1                
macaroonbakery           1.3.1                
Magnus                   1.0.3                
Mako                     1.1.0                
Markdown                 3.4.1                
MarkupSafe               2.1.1                
matplotlib               3.3.4                
mem                      1.0.1                
menulibre                2.2.1                
meson                    0.53.2              
more-itertools           4.2.0                
mpmath                   1.2.1                
mysql-connector-python   8.0.33              
namedlist                1.8                  
netifaces                0.10.4              
networkx                 2.8.5                
notify2                  0.3                  
numba                    0.56.0              
numpy                    1.20.1              
nvidia-ml-py3            7.352.0              
oauthlib                 3.1.0                
olefile                  0.46                
onboard                  1.4.1                
opencv-python            4.6.0.66            
ordered-set              4.0.2                
ortools                  8.1.8487            
packaging                20.3                
pandas                   1.2.2                
pdfarranger              1.4.2                
pdfCropMargins           1.0.9                
pefile                   2022.5.30            
pexpect                  4.6.0                
pikepdf                  1.10.3+dfsg          
Pillow                   9.1.1                
pip                      20.0.2              
playwright               1.30.0              
pluggy                   0.13.0              
ply                      3.11                
pretext                  1.7.5                
protobuf                 3.15.2              
psutil                   5.8.0                
py                       1.8.1                
pyasn1                   0.4.8                
pyasn1-modules           0.2.8                
pybloom-live             3.0.0                
pycairo                  1.16.2              
pycparser                2.20                
pycrypto                 2.6.1                
pycups                   1.9.73              
pydantic                 1.10.12              
pydantic-xml             1.0.0                
pyee                     9.0.4                
Pygments                 2.15.0              
PyGObject                3.36.0              
PyJWT                    1.7.1                
PyLaTeX                  1.4.1                
pymacaroons              0.13.0              
PyNaCl                   1.3.0                
pyOpenSSL                20.0.1              
pyparsing                2.4.7                
PyPDF2                   2.5.0                
pypng                    0.20220715.0        
pyppeteer                1.0.2                
pyradios                 0.0.22              
pyRFC3339                1.1                  
pytest                   4.6.9                
pytest-arraydiff         0.3                  
pytest-astropy           0.7.0                
pytest-astropy-header    0.1.2                
pytest-doctestplus       0.5.0                
pytest-openfiles         0.4.0                
pytest-remotedata        0.3.2                
python-apt               2.0.1+ubuntu0.20.4.1
python-chess             1.999                
python-dateutil          2.8.1                
python-debian            0.1.36+ubuntu1.1    
python-slugify           5.0.2                
python-xapp              1.8.1                
pytz                     2019.3              
pyudev                   0.21.0              
PyWavelets               1.3.0                
pyxattr                  0.6.1                
pyxdg                    0.26                
PyYAML                   5.3.1                
qrcode                   7.4.2                
radio-active             2.4.0                
ramanujan                0.0.1                /datadisk/apps/MasseyRamanujan-master
realesrgan               0.2.5.0              
relpath                  3.0.5                
reportlab                3.5.34              
requests                 2.25.1              
requests-oauthlib        1.3.1                
requests-unixsocket      0.2.0                
rich                     10.1.0              
rsa                      4.9                  
scikit-image             0.19.3              
scipy                    1.3.3                
screen-resolution-extra  0.0.0                
SecretStorage            2.3.1                
setproctitle             1.1.10              
setuptools               45.2.0              
simplejson               3.16.0              
single-version           1.5.1                
six                      1.14.0              
smmap                    5.0.0                
soupsieve                1.9.5                
sout                     1.1.0                
ssh-import-id            5.10                
strictyaml               1.6.2                
style                    1.1.0                
sympy                    1.7.1                
sysmontask               1.1.1                
System-Monitoring-Center 1.4.0                
tb-nightly               2.10.0a20220804      
tensorboard-data-server  0.6.1                
tensorboard-plugin-wit   1.8.1                
text-unidecode           1.3                  
thrift                   0.16.0              
tifffile                 2022.8.3            
toml                     0.10.0              
torch                    1.12.0              
torchvision              0.13.0              
tornado                  6.1                  
tox                      3.13.2              
tqdm                     4.64.0              
typer                    0.7.0                
typing-extensions        3.10.0.2            
ubuntu-advantage-tools   8001                
ubuntu-drivers-common    0.0.0                
ufw                      0.36                
unattended-upgrades      0.1                  
update                   0.0.1                
urllib3                  1.26.4              
vboxapi                  1.0                  
virtualenv               20.0.17              
wadllib                  1.3.3                
watchdog                 3.0.0                
wcwidth                  0.1.8                
webencodings             0.5.1                
websockets               10.3                
Werkzeug                 2.2.1                
wheel                    0.34.2              
xkit                     0.0.0                
xxhash                   2.0.0                
yapf                     0.32.0              
youtube-dl               2020.3.24            
zenlog                   1.1                  
zipp                     1.0.0               

OHappyDay

unread,
Aug 28, 2023, 4:04:02 PMAug 28
to PreTeXt support
I tried to install previous versions:

- 1.7.0: perfect
- 1.7.1: perfect
- 1.7.2 and later: same error message as above (cannot import name dataclass_transform)

OHappyDay

unread,
Aug 29, 2023, 7:06:12 AMAug 29
to PreTeXt support
Solved.

I removed the ~/.local/lib/python3.8 folder and installed pretext again. This time everything worked out fine and the newest version is running.

Klaus
Reply all
Reply to author
Forward
0 new messages