Welcome to Cadabra Q&A, where you can ask questions and receive answers from other members of the community.
+1 vote

I tried to upgrade my Cadabra installation on Ubuntu, by installing the latest version of Cadabra from GitHub. When running e.g.,

{\mu,\nu}::Indices(position=independent);

I get the following error:

NameError: name 'LaTeXString' is not defined

I tried uninstalling and re-installing various times, both by compiling from GitHub source and by installing the package that can be found on the Cadabra website, but I keep on getting the same error.

Presumably there are some clashes with left-over files from a previous installation. Is there any way that I can properly uninstall any left over files from previous versions, so that I can try to do a fresh and working install again?

in Installation trouble by (130 points)
edited by

1 Answer

+1 vote

This depends a lot on how you installed Cadabra before. Did it come from the Cadabra package in the Ubuntu repositories? Or from an earlier install from source? If you installed from a previous package, you should do

sudo apt remove cadabra2

to remove it (and then re-install from source).

If you installed from source, you will need to do some more work. Typically, when you install from source, and do not pass any installation directory parameters, things go into

/usr/local/lib/python3.x/dist-packages/

(replace python3.x with the appropriate Python version). For me this contains (among non-cadabra things),

cadabra2.cpython-310-aarch64-linux-gnu.so
cadabra2_defaults.py
cdb_appdirs.py
cadabra2_jupyter/
cdb/
notebook/

(names will differ on a different architecture). Erase all these (both the files and the directories). Then there is also a bunch of cadabra* binaries in

/usr/local/bin/

Finally, there is a directory

/usr/local/share/cadabra2/

If you erase all this and re-install from source, hopefully things go better.

by (82.5k points)
...