Closed eliasteve closed 1 year ago
I cannot reproduce this with jax 0.4.19. What version of jax are you using?
Also pyscf 2.4.0 works fine for me with numpy 1.26.1 -- are you also using an older version of pyscf?
pip freeze
is helpful to show the versions of all modules installed.
The version of jax was 0.4.16, I've installed version 0.4.19 and the code runs fine, thanks! As for pyscf, I'm running version 2.4.0 as well, but when I try importing it (with numpy version 1.26.1) I get
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
[<ipython-input-2-39797ef5fbb5>](https://localhost:8080/#) in <cell line: 1>()
----> 1 import pyscf
10 frames
[/usr/local/lib/python3.10/dist-packages/pyscf/__init__.py](https://localhost:8080/#) in <module>
97 from pyscf import lib
98 from pyscf import gto
---> 99 from pyscf import scf
100 from pyscf import ao2mo
101
[/usr/local/lib/python3.10/dist-packages/pyscf/scf/__init__.py](https://localhost:8080/#) in <module>
103
104 from pyscf import gto
--> 105 from pyscf.scf import hf
106 rhf = hf
107 from pyscf.scf import rohf
[/usr/local/lib/python3.10/dist-packages/pyscf/scf/hf.py](https://localhost:8080/#) in <module>
31 from pyscf import lib
32 from pyscf.lib import logger
---> 33 from pyscf.scf import diis
34 from pyscf.scf import _vhf
35 from pyscf.scf import chkfile
[/usr/local/lib/python3.10/dist-packages/pyscf/scf/diis.py](https://localhost:8080/#) in <module>
24 import numpy
25 import scipy.linalg
---> 26 import scipy.optimize
27 from pyscf import lib
28 from pyscf.lib import logger
[/usr/local/lib/python3.10/dist-packages/scipy/optimize/__init__.py](https://localhost:8080/#) in <module>
408
409 from ._optimize import *
--> 410 from ._minimize import *
411 from ._root import *
412 from ._root_scalar import *
[/usr/local/lib/python3.10/dist-packages/scipy/optimize/_minimize.py](https://localhost:8080/#) in <module>
25 from ._trustregion_krylov import _minimize_trust_krylov
26 from ._trustregion_exact import _minimize_trustregion_exact
---> 27 from ._trustregion_constr import _minimize_trustregion_constr
28
29 # constrained minimization
[/usr/local/lib/python3.10/dist-packages/scipy/optimize/_trustregion_constr/__init__.py](https://localhost:8080/#) in <module>
2
3
----> 4 from .minimize_trustregion_constr import _minimize_trustregion_constr
5
6 __all__ = ['_minimize_trustregion_constr']
[/usr/local/lib/python3.10/dist-packages/scipy/optimize/_trustregion_constr/minimize_trustregion_constr.py](https://localhost:8080/#) in <module>
3 from scipy.sparse.linalg import LinearOperator
4 from .._differentiable_functions import VectorFunction
----> 5 from .._constraints import (
6 NonlinearConstraint, LinearConstraint, PreparedConstraint, Bounds, strict_bounds)
7 from .._hessian_update_strategy import BFGS
[/usr/local/lib/python3.10/dist-packages/scipy/optimize/_constraints.py](https://localhost:8080/#) in <module>
6 from ._optimize import OptimizeWarning
7 from warnings import warn, catch_warnings, simplefilter
----> 8 from numpy.testing import suppress_warnings
9 from scipy.sparse import issparse
10
[/usr/local/lib/python3.10/dist-packages/numpy/testing/__init__.py](https://localhost:8080/#) in <module>
9
10 from . import _private
---> 11 from ._private.utils import *
12 from ._private.utils import (_assert_valid_refcount, _gen_alignment_data)
13 from ._private import extbuild
[/usr/local/lib/python3.10/dist-packages/numpy/testing/_private/utils.py](https://localhost:8080/#) in <module>
55 IS_PYSTON = hasattr(sys, "pyston_version_info")
56 HAS_REFCOUNT = getattr(sys, 'getrefcount', None) is not None and not IS_PYSTON
---> 57 HAS_LAPACK64 = numpy.linalg._umath_linalg._ilp64
58
59 _OLD_PROMOTION = lambda: np._get_promotion_state() == 'legacy'
AttributeError: module 'numpy.linalg._umath_linalg' has no attribute '_ilp64'
However, this is not crucial because using version 1.26.0 of numpy solves the issue for me.
Hi, I'm trying to run the example script for the H2 molecule on Colab, but I run into an attribute error on the first iteration of training. Below are the commands I'm using to install the relevant packages:
the script I'm trying to run:
as well as the full printout of the error message: