Ask Your Question

install knotinfo package on windows

asked 2022-04-22 11:09:28 +0200

ruilong gravatar image

I want to install the knotinfo database package, see the installation guide in the sagemath documentation on the knotinfo database.

If I type "sage -i database_knotinfo" or "-i database_knotinfo" or "i database_knotinfo" in the Sage console, then I get the error "invalid syntax" as follows:

File "<ipython-input-1-96c1d7170917>", line 1
sage -i database_knotinfo
SyntaxError: invalid syntax

All I could find was a post on how to install packages while launching Sage, but I launch Sage by double-clicking the app icon. I also saw something about a "Sage menu" or "command line", but literally all I have is the "SageMath 9.3 Console", so I don't know what to do. Any help is appreciated, thanks.

Edit: I managed to find the Sagemath Shell by right-clicking the app icon, then clicking "open path", then going back in the path to Sagemath. Next, I had to open Sagemath Shell by right-clicking again and choosing "open as administrator". Then I think I was able to install the knotinfo database by typing "pip install database_knotinfo", but I'm not so sure, since it only took a couple seconds and I still can't use knotinfo in the Sage console.

Now I have the problem that when I try to use "from sage.knots.knotinfo import KnotInfo" to get access to knotinfo, I get the following error message:

ModuleNotFoundError Traceback (most recent call last) <ipython-input-1-753febcbc49c> in <module> ----> 1 from sage.knots.knotinfo import KnotInfo

ModuleNotFoundError: No module named 'sage.knots.knotinfo'

What did I do wrong?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-04-22 12:15:44 +0200

ruilong gravatar image

It seems like it isn't possible to use knotinfo at all on windows-sage, even after installing the database_knotinfo package. However, the sage syzygy website allows to use sage online with packages. Using the command "pip install database_knotinfo", I was able to use "from sage.knots.knotinfo import KnotInfo" in the same file and it worked!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2022-04-21 12:23:04 +0200

Seen: 21 times

Last updated: Apr 22