4
$\begingroup$

I have been trying to install the Knot Theory package from the knot atlas, but have been unsuccessful. Firstly I tried the command

<< KnotTheory`

but received a failure message. I then proceeded to modify the directory using the the AppendTo[$Path, "DIRECTORY"] command, and still receive the same failure message.

What is going wrong?

$\endgroup$
2
  • $\begingroup$ Check if $Path contains your directory. Or specify the full pathname. B.t.w. you can also use Needs $\endgroup$ Commented Dec 23, 2020 at 8:34
  • $\begingroup$ The same with me "Get::noopen: Cannot open KnotTheory`". $\endgroup$
    – user64494
    Commented Dec 23, 2020 at 10:16

2 Answers 2

1
$\begingroup$

i downloaded and unzipped the package in

C:\Parent

Appended the path as it is explained:

AppendTo[$Path, "C:\\Parent"]

There were some errors during the import

<<KnotTheory`
ParentDirectory::nums: Argument File should be a positive machine-size integer, a nonempty string, or a File specification.
ParentDirectory::nums: Argument File should be a positive machine-size integer, a nonempty string, or a File specification.
ToFileName::strse: String or list of strings expected at position 1 in ToFileName[{File,WikiLink,mathematica}].
ToFileName::strse: String or list of strings expected at position 1 in ToFileName[{File,QuantumGroups}].
Loading KnotTheory` version of September 6, 2014, 13:37:37.2841.
Read more at http://katlas.org/wiki/KnotTheory.

but some of the functions work:

In[8]:= KnotTheoryVersion[]
Out[8]= {2014,9,6,13,37,37.2841}

Mathematica version: 12

$\endgroup$
2
$\begingroup$

Here is my workaround for this problem. (The package is assumed to be unzipped in "C:/Parent" directory.)

(1) Find the "init.m" file in the directory "C:/Parent/KnotTheory".

(2) Open the file with a text editor, and replace the lines 51-53

    KnotTheoryDirectory[] = (File /.Flatten[FileInformation[ToFileName[#,"KnotTheory"]] & /@ ($Path /. "." ->Directory[])])

by

KnotTheoryDirectory[] = "C:/Parent"

(3) Save the "init.m" file.

(4) Add the installation directory to the search path:

AppendTo[$Path,"C:/Parent"]

(5) You can use the package by

Needs["KnotTheory`"]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.