Installation problem with ITensor v=0.3

Hi,
I’m having some problems using the lastest version of ITensor in my laptop. When I install the latest version I get a warning of an errored dependency. Then I use import Pkg; Pkg.precompile(), and I get the following error:

ERROR: The following 1 direct dependency failed to precompile:

ITensors [9136182c-28ba-11e9-034c-db9fb085ebd5]

Failed to precompile ITensors [9136182c-28ba-11e9-034c-db9fb085ebd5] to “/home/rmp129/.julia/compiled/v1.9/ITensors/jl_rlL649”.
ERROR: LoadError: UndefVarError: disable_auto_fermion not defined

It seems that disable_auto_fermion is just a function, but I’ve tried to reinstalling everything in different ways and the problem still persists. However, if I just install the v=0.2 version of ITensor, the problem is solved. What could be the problem? Thanks in advance!

Hello,

Sorry to hear that you’re having issues! Do you have a version of NDTensors installed in your Project.toml? Can you provide the output of julia>]st? When you have ITensors v=0.2 compiled can you try running julia>]up to update all the packages in your Project.toml? I believe ITensors imports the function disable_auto_fermion from NDTensors so if this package is not up to date ITensors will fail to precompile. Thank you!

Karl

1 Like

Hello Karl,
I tried the following: Having ITensors v=0.2 compiled, I run julia>]up . Then, this is the outcome of julia>]st :

  [336ed68f] CSV v0.10.11
  [31c24e10] Distributions v0.25.103
  [7073ff75] IJulia v1.24.2
⌃ [9136182c] ITensors v0.3.42
  [b1bec4e5] LIBSVM v0.8.0
  [33e6dc65] MKL v0.6.1
  [6ee0df7b] MLJLinearModels v0.10.0
⌃ [23ae76d9] NDTensors v0.2.6
  [15e1cf62] NPZ v0.4.3
  [3646fa90] ScikitLearn v0.7.0
⌅ [2913bbd2] StatsBase v0.33.21
  [07315a1d] SyntheticDatasets v0.1.1
  [bd369af6] Tables v1.11.1
  [37e2e46d] LinearAlgebra
  [9a3f8284] Random
  [2f01184e] SparseArrays
  [10745b16] Statistics v1.9.0

It seems everything is updated but I still have the same problem :frowning:

The ^ next to ITensors and NDTensors indicates that they are not fully updated. You should upgrade both to the latest available versions.

There isn’t much of a reason to have NDTensors installed explicitly. It seems many people have issues related to NDTensors and ITensors versions becoming out of sync. To simplify things, you can just do rm NDTensors, and then make sure ITensors is kept up to date (this would be a recommendation for others as well).

2 Likes

I found the problem! While forcing the update of ITensors to the latest version, an incompatibility issue arose because of the package SyntheticDatasets. This package was downgrading the packages Compat and DataFrames, clashing with ITensors. Just removed SyntheticDatasets and everything works fine :slight_smile: Thank you very much!

1 Like

Glad you found the issue, thanks for the update.

That’s one of the more subtle kinds of issues when dealing with the Julia package manager. It can be good to raise issues about that with other packages so they make sure to use up-to-date versions of packages.