QuanEstimation / QuanEstimation

QuanEstimation is an open-source toolkit for quantum parameter estimation.
MIT License
39 stars 5 forks source link

How to install quanestimation with Python interpreter statically linked to libpython #214

Closed hmyuuu closed 5 months ago

hmyuuu commented 1 year ago

PyJulia Troubleshooting: Your Python interpreter is statically linked to libpython

Asciinema Record: How to install quanestimation with Python interpreter statically linked to libpython

Papageno2 commented 1 year ago

It's amazing to learn about this toolbox as a beginner in this field.

I'm facing the same issue while trying to install quanestimation on both macOS(M1) and Ubuntu22.04 using a statically linked Python interpreter to libpython.

Despite following the steps provided in the Asciinema record, I haven't been able to successfully install it.

>>> import julia; julia.install()
[ Info: Julia version info
Julia Version 1.9.1
Commit 147bdf428cd (2023-06-07 08:27 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
      Ubuntu 22.04.1 LTS
  uname: Linux 5.19.0-32-generic #33~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Jan 30 17:03:34 UTC 2 x86_64 x86_64
  CPU: Intel(R) Xeon(R) Gold 6326 CPU @ 2.90GHz: 
                 speed         user         nice          sys         idle          irq
       #1-64   800 MHz    1241728 s        798 s      31921 s   98626838 s          0 s
  Memory: 125.5419692993164 GB (125803.98828125 MB free)
  Uptime: 156168.86 sec
  Load Avg:  0.1  0.04  0.01
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, icelake-server)
  Threads: 1 on 64 virtual cores
Environment:
  LD_LIBRARY_PATH = /usr/local/cuda-11.8/lib64:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/local/cuda-11.8/lib64
  HOME = /home/admin
  SNAP_LIBRARY_PATH = /var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl32:/var/lib/snapd/void
  TERM = xterm-256color
  PATH = /home/admin/.local/bin:/usr/local/cuda-11.8/bin:/opt/anaconda3/bin:/opt/anaconda3/condabin:/usr/local/cuda-11.8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
  SNAP_REAL_HOME = /home/admin
[ Info: Julia executable: /snap/julia/80/bin/julia
[ Info: Trying to import PyCall...
┌ Info: PyCall is already installed and compatible with Python executable.
│ 
│ PyCall:
│     python: /opt/anaconda3/bin/python
│     libpython: /opt/anaconda3/lib/libpython3.9.so.1.0
│ Python:
│     python: /opt/anaconda3/bin/python
└     libpython: 
>>> 

I would greatly appreciate any assistance or guidance to resolve this problem.

hmyuuu commented 1 year ago

I'm eagar to help. Could you please provide further information such as any warning messages, traceback, or a Minimal Reproducible Example (MRE)? This will help us better check out the problem

Papageno2 commented 1 year ago

It's amazing to learn about this toolbox as a beginner in this field.

I'm facing the same issue while trying to install quanestimation on both macOS(M1) and Ubuntu22.04 using a statically linked Python interpreter to libpython.

Despite following the steps provided in the Asciinema record, I haven't been able to successfully install it.

>>> import julia; julia.install()
[ Info: Julia version info
Julia Version 1.9.1
Commit 147bdf428cd (2023-06-07 08:27 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
      Ubuntu 22.04.1 LTS
  uname: Linux 5.19.0-32-generic #33~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Jan 30 17:03:34 UTC 2 x86_64 x86_64
  CPU: Intel(R) Xeon(R) Gold 6326 CPU @ 2.90GHz: 
                 speed         user         nice          sys         idle          irq
       #1-64   800 MHz    1241728 s        798 s      31921 s   98626838 s          0 s
  Memory: 125.5419692993164 GB (125803.98828125 MB free)
  Uptime: 156168.86 sec
  Load Avg:  0.1  0.04  0.01
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, icelake-server)
  Threads: 1 on 64 virtual cores
Environment:
  LD_LIBRARY_PATH = /usr/local/cuda-11.8/lib64:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/local/cuda-11.8/lib64
  HOME = /home/admin
  SNAP_LIBRARY_PATH = /var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl32:/var/lib/snapd/void
  TERM = xterm-256color
  PATH = /home/admin/.local/bin:/usr/local/cuda-11.8/bin:/opt/anaconda3/bin:/opt/anaconda3/condabin:/usr/local/cuda-11.8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
  SNAP_REAL_HOME = /home/admin
[ Info: Julia executable: /snap/julia/80/bin/julia
[ Info: Trying to import PyCall...
┌ Info: PyCall is already installed and compatible with Python executable.
│ 
│ PyCall:
│     python: /opt/anaconda3/bin/python
│     libpython: /opt/anaconda3/lib/libpython3.9.so.1.0
│ Python:
│     python: /opt/anaconda3/bin/python
└     libpython: 
>>> 

I would greatly appreciate any assistance or guidance to resolve this problem.

After I finish the above operations, I try to import quanestimation on MacOS,

>>> import quanestimation
/Users/papageno/anaconda3/lib/python3.10/site-packages/julia_project/_julia_project.py:252: UserWarning: 
Your python executable is statically linked to libpython and you (or a package
author) have requested the Python module `julia` from the package `pyjulia`. The
module `julia` requires a dynamically linked python executable. The module
`juliacall` from the package `juliacall` will be used instead. This may not be
compatible with package that created this instance of JuliaProject.

  warnings.warn(
python(27897,0x104e5c580) malloc: *** error for object 0x1052b8050: pointer being freed was not allocated
python(27897,0x104e5c580) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort      python

similar problem happens on Ubuntu,

>>> import quanestimation
/home/admin/.local/lib/python3.9/site-packages/julia_project/_julia_project.py:252: UserWarning: 
Your python executable is statically linked to libpython and you (or a package
author) have requested the Python module `julia` from the package `pyjulia`. The
module `julia` requires a dynamically linked python executable. The module
`juliacall` from the package `juliacall` will be used instead. This may not be
compatible with package that created this instance of JuliaProject.

  warnings.warn(
[juliapkg] Locating Julia ^1.6.1
[juliapkg] Using Julia 1.9.2 at /snap/bin/julia
[juliapkg] Using Julia project at /opt/anaconda3/julia_env
[juliapkg] Installing packages:
           julia> import Pkg
           julia> Pkg.add([Pkg.PackageSpec(name="PythonCall", uuid="6099a3de-0909-46bc-b1f4-468b9a2dfc0d")])
           julia> Pkg.resolve()
           julia> Pkg.precompile()
    Updating registry at `~/.julia/registries/General.toml`
   Resolving package versions...
    Updating `/opt/anaconda3/julia_env/Project.toml`
  [6099a3de] + PythonCall v0.9.13
    Updating `/opt/anaconda3/julia_env/Manifest.toml`
  [992eb4ea] + CondaPkg v0.2.18
  [9a962f9c] + DataAPI v1.15.0
  [e2d170a0] + DataValueInterfaces v1.0.0
  [82899510] + IteratorInterfaceExtensions v1.0.0
  [692b3bcd] + JLLWrappers v1.4.1
  [0f8b85d8] + JSON3 v1.13.1
  [1914dd2f] + MacroTools v0.5.10
  [0b3b1443] + MicroMamba v0.1.13
  [bac558e1] + OrderedCollections v1.6.0
  [69de0a69] + Parsers v2.7.1
  [fa939f87] + Pidfile v1.3.0
  [aea7be01] + PrecompileTools v1.1.2
  [21216c6a] + Preferences v1.4.0
  [6099a3de] + PythonCall v0.9.13
  [ae029012] + Requires v1.3.0
  [6c6a2e73] + Scratch v1.2.0
  [856f2bd8] + StructTypes v1.10.0
  [3783bdb8] + TableTraits v1.0.1
  [bd369af6] + Tables v1.10.1
  [e17b2a0c] + UnsafePointers v1.0.0
⌅ [f8abcde7] + micromamba_jll v1.4.1+0
  [0dad84c5] + ArgTools v1.1.1
  [56f22d72] + Artifacts
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [f43a241f] + Downloads v1.6.0
  [7b1f6079] + FileWatching
  [b77e0a4c] + InteractiveUtils
  [4af54fe1] + LazyArtifacts
  [b27032c2] + LibCURL v0.6.3
  [76f85450] + LibGit2
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [a63ad114] + Mmap
  [ca575930] + NetworkOptions v1.2.0
  [44cfe95a] + Pkg v1.9.2
  [de0858da] + Printf
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA v0.7.0
  [9e88b42a] + Serialization
  [6462fe0b] + Sockets
  [fa267f1f] + TOML v1.0.3
  [a4e569a6] + Tar v1.10.0
  [8dfed614] + Test
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode
  [e66e0078] + CompilerSupportLibraries_jll v1.0.5+0
  [deac9b47] + LibCURL_jll v7.84.0+0
  [29816b5a] + LibSSH2_jll v1.10.2+0
  [c8ffd9c3] + MbedTLS_jll v2.28.2+0
  [14a3606d] + MozillaCACerts_jll v2022.10.11
  [4536629a] + OpenBLAS_jll v0.3.21+4
  [83775a58] + Zlib_jll v1.2.13+0
  [8e850b90] + libblastrampoline_jll v5.8.0+0
  [8e850ede] + nghttp2_jll v1.48.0+0
  [3f19e933] + p7zip_jll v17.4.0+0
        Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`
Precompiling project...
[6099a3de] + PythonCall v0.9.13
    Updating `/opt/anaconda3/julia_env/Manifest.toml`
  [992eb4ea] + CondaPkg v0.2.18
  [9a962f9c] + DataAPI v1.15.0
  [e2d170a0] + DataValueInterfaces v1.0.0
  [82899510] + IteratorInterfaceExtensions v1.0.0
  [692b3bcd] + JLLWrappers v1.4.1
  [0f8b85d8] + JSON3 v1.13.1
  [1914dd2f] + MacroTools v0.5.10
  [0b3b1443] + MicroMamba v0.1.13
  [bac558e1] + OrderedCollections v1.6.0
  [69de0a69] + Parsers v2.7.1
  [fa939f87] + Pidfile v1.3.0
  [aea7be01] + PrecompileTools v1.1.2
  [21216c6a] + Preferences v1.4.0
  [6099a3de] + PythonCall v0.9.13
  [ae029012] + Requires v1.3.0
  [6c6a2e73] + Scratch v1.2.0
  [856f2bd8] + StructTypes v1.10.0
  [3783bdb8] + TableTraits v1.0.1
  [bd369af6] + Tables v1.10.1
  [e17b2a0c] + UnsafePointers v1.0.0
⌅ [f8abcde7] + micromamba_jll v1.4.1+0
  [0dad84c5] + ArgTools v1.1.1
  [56f22d72] + Artifacts
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [f43a241f] + Downloads v1.6.0
  [7b1f6079] + FileWatching
  [b77e0a4c] + InteractiveUtils
  [4af54fe1] + LazyArtifacts
  [b27032c2] + LibCURL v0.6.3
  [76f85450] + LibGit2
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [a63ad114] + Mmap
  [ca575930] + NetworkOptions v1.2.0
  [44cfe95a] + Pkg v1.9.2
  [de0858da] + Printf
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA v0.7.0
  [9e88b42a] + Serialization
  [6462fe0b] + Sockets
  [fa267f1f] + TOML v1.0.3
  [a4e569a6] + Tar v1.10.0
  [8dfed614] + Test
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode
  [e66e0078] + CompilerSupportLibraries_jll v1.0.5+0
  [deac9b47] + LibCURL_jll v7.84.0+0
  [29816b5a] + LibSSH2_jll v1.10.2+0
  [c8ffd9c3] + MbedTLS_jll v2.28.2+0
  [14a3606d] + MozillaCACerts_jll v2022.10.11
  [4536629a] + OpenBLAS_jll v0.3.21+4
  [83775a58] + Zlib_jll v1.2.13+0
  [8e850b90] + libblastrampoline_jll v5.8.0+0
  [8e850ede] + nghttp2_jll v1.48.0+0
  [3f19e933] + p7zip_jll v17.4.0+0
        Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`
Precompiling project...
  18 dependencies successfully precompiled in 22 seconds. 7 already precompiled.
  No Changes to `/opt/anaconda3/julia_env/Project.toml`
  No Changes to `/opt/anaconda3/julia_env/Manifest.toml`

I can compile a system image after installation.
Compilation may take a few, or many, minutes. You may compile now, later, or never.
Would you like to compile a system image after installation?
 [Y/n] y
Instantiating project...
  Activating project at `/opt/anaconda3/julia_project/quanestimation-1.9.2`
   Resolving package versions...
   Installed AbstractFFTs ─ v1.4.0
    Updating `/opt/anaconda3/julia_project/quanestimation-1.9.2/Project.toml`
  [6099a3de] + PythonCall v0.9.13
  [088c8dff] + QuanEstimation v0.1.3
    Updating `/opt/anaconda3/julia_project/quanestimation-1.9.2/Manifest.toml`
  [47edcb42] + ADTypes v0.1.5
  [14f7f29c] + AMD v0.5.0
  [621f4979] + AbstractFFTs v1.4.0
⌅ [1520ce14] + AbstractTrees v0.3.4
⌃ [7d9f7c33] + Accessors v0.1.31
  [79e6a3ab] + Adapt v3.6.2
  [dce04be8] + ArgCheck v2.3.0
  [ec485272] + ArnoldiMethod v0.2.0
⌅ [4fba245c] + ArrayInterface v6.0.25
  [30b0a656] + ArrayInterfaceCore v0.1.29
  [6ba088a2] + ArrayInterfaceGPUArrays v0.2.2
  [015c0d05] + ArrayInterfaceOffsetArrays v0.1.7
  [b0d46f97] + ArrayInterfaceStaticArrays v0.1.5
  [dd5226c6] + ArrayInterfaceStaticArraysCore v0.1.4
⌃ [4c555306] + ArrayLayouts v0.8.18
  [a9b6321e] + Atomix v0.1.0
  [13072b0f] + AxisAlgorithms v1.0.1
⌅ [ab4f0b2a] + BFloat16s v0.2.0
⌃ [aae01518] + BandedMatrices v0.17.18
  [198e06fe] + BangBang v0.3.39
  [9718e550] + Baselet v0.1.1
  [6e4b80f9] + BenchmarkTools v1.3.2
  [62783981] + BitTwiddlingConvenienceFunctions v0.1.5
⌅ [764a87c0] + BoundaryValueDiffEq v2.11.0
  [fa961155] + CEnum v0.4.2
  [2a0fbf3d] + CPUSummary v0.2.3
⌅ [052768ef] + CUDA v3.13.1
  [49dc2e85] + Calculus v0.5.1
  [082447d4] + ChainRules v1.52.0
  [d360d2e6] + ChainRulesCore v1.16.0
  [9de3a189] + CircularArrayBuffers v0.1.10
⌃ [fb6a15b2] + CloseOpenIntervals v0.1.11
  [523fee87] + CodecBzip2 v0.7.2
  [944b1d66] + CodecZlib v0.7.1
  [3da002f7] + ColorTypes v0.11.4
  [c3611d14] + ColorVectorSpace v0.9.10
  [5ae59095] + Colors v0.12.10
  [d842c3ba] + CommonRLInterface v0.3.3
  [38540f10] + CommonSolve v0.2.4
  [bbf7d656] + CommonSubexpressions v0.3.0
⌅ [34da2185] + Compat v3.46.2
  [a33af91c] + CompositionsBase v0.1.2
  [992eb4ea] + CondaPkg v0.2.18
  [187b0558] + ConstructionBase v1.5.2
  [6add18c4] + ContextVariablesX v0.1.3
⌅ [d38c429a] + Contour v0.5.7
  [f65535da] + Convex v0.15.3
  [adafc99b] + CpuId v0.3.1
  [a8cc5b0e] + Crayons v4.1.1
  [9a962f9c] + DataAPI v1.15.0
  [864edb3b] + DataStructures v0.18.14
  [e2d170a0] + DataValueInterfaces v1.0.0
  [244e2a9f] + DefineSingletons v0.1.2
  [8bb1440f] + DelimitedFiles v1.9.1
⌃ [2b5f629d] + DiffEqBase v6.119.0
  [163ba53b] + DiffResults v1.1.0
  [b552c78f] + DiffRules v1.15.1
  [b4f34e82] + Distances v0.10.8
  [31c24e10] + Distributions v0.25.98
  [ffbed154] + DocStringExtensions v0.9.3
  [fa6b7ba4] + DualNumbers v0.6.8
  [fdbdab4c] + ElasticArrays v1.2.11
⌃ [da5c29d0] + EllipsisNotation v1.6.0
  [4e289a0a] + EnumX v1.0.4
⌃ [d4d017d3] + ExponentialUtilities v1.23.0
  [e2ba6199] + ExprTools v0.1.9
  [411431e0] + Extents v0.1.1
  [cc61a311] + FLoops v0.2.1
  [b9860ae5] + FLoopsBase v0.1.1
⌃ [7034ab61] + FastBroadcast v0.2.4
  [9aa1b823] + FastClosures v0.3.2
⌅ [29a986be] + FastLapackInterface v1.2.9
  [5789e2e9] + FileIO v1.16.1
⌅ [1a297f60] + FillArrays v0.13.11
⌃ [6a86dc24] + FiniteDiff v2.17.0
  [53c48c17] + FixedPointNumbers v0.8.4
⌃ [587475ba] + Flux v0.13.4
  [9c68100b] + FoldsThreads v0.1.2
  [f6369f11] + ForwardDiff v0.10.35
  [b38be410] + FreeType v4.0.0
⌅ [663a7486] + FreeTypeAbstraction v0.9.9
  [069b7b12] + FunctionWrappers v1.1.3
  [77dc65aa] + FunctionWrappersWrappers v0.1.3
⌅ [d9f16b24] + Functors v0.2.8
  [0c68f7d7] + GPUArrays v8.8.1
  [46192b85] + GPUArraysCore v0.1.5
⌅ [61eb1bfa] + GPUCompiler v0.17.3
  [c145ed77] + GenericSchur v0.5.3
  [cf35fbd7] + GeoInterface v1.3.1
  [5c1252a2] + GeometryBasics v0.4.7
  [86223c79] + Graphs v1.8.0
  [3e5b6fbb] + HostCPUFeatures v0.1.15
  [34004b35] + HypergeometricFunctions v0.3.17
  [7869d1d1] + IRTools v0.4.10
  [615f187c] + IfElse v0.1.1
  [d25df0c9] + Inflate v0.1.3
  [22cec73e] + InitialValues v0.3.1
⌅ [a98d9a8b] + Interpolations v0.13.6
⌅ [8197267c] + IntervalSets v0.5.4
  [3587e190] + InverseFunctions v0.1.10
  [92d709cd] + IrrationalConstants v0.2.2
  [c8e1da08] + IterTools v1.8.0
  [42fd0dbc] + IterativeSolvers v0.9.2
  [82899510] + IteratorInterfaceExtensions v1.0.0
  [692b3bcd] + JLLWrappers v1.4.1
  [682c06a0] + JSON v0.21.4
  [0f8b85d8] + JSON3 v1.13.1
  [b14d175d] + JuliaVariables v0.2.4
  [ef3ab10e] + KLU v0.4.0
  [63c18a36] + KernelAbstractions v0.9.6
  [ba0b0d4f] + Krylov v0.9.1
  [0b1a1467] + KrylovKit v0.6.0
  [40e66cde] + LDLFactorizations v0.10.0
⌅ [929cbde3] + LLVM v4.17.1
⌃ [10f19ff3] + LayoutPointers v0.1.13
  [50d2b5c4] + Lazy v0.15.1
  [8cdb02fc] + LazyModules v0.3.1
  [d3d80556] + LineSearches v7.2.0
⌅ [7ed4a6bd] + LinearSolve v1.37.0
  [2ab3a3ac] + LogExpFunctions v0.3.24
⌃ [bdcacae8] + LoopVectorization v0.12.150
  [d8e11817] + MLStyle v0.4.17
⌅ [f1d291b0] + MLUtils v0.2.11
  [1914dd2f] + MacroTools v0.5.10
  [d125e4d3] + ManualMemory v0.1.8
  [299715c1] + MarchingCubes v0.1.8
  [b8f27783] + MathOptInterface v1.18.0
  [128add7d] + MicroCollections v0.1.4
  [0b3b1443] + MicroMamba v0.1.13
  [e1d29d7a] + Missings v1.1.0
  [46d2c3a1] + MuladdMacro v0.2.4
  [d8a4904e] + MutableArithmetics v1.3.0
  [d41bc354] + NLSolversBase v7.8.3
  [2774e3e8] + NLsolve v4.5.1
⌅ [872c559c] + NNlib v0.8.21
⌃ [a00861dc] + NNlibCUDA v0.2.6
  [77ba4419] + NaNMath v1.0.2
  [71a1bf82] + NameResolution v0.1.5
⌃ [8913a72c] + NonlinearSolve v1.6.0
  [6fe1bfb0] + OffsetArrays v1.12.10
⌃ [3bd65402] + Optimisers v0.2.9
  [bac558e1] + OrderedCollections v1.6.0
⌃ [1dea7af3] + OrdinaryDiffEq v6.44.1
  [90014a1f] + PDMats v0.11.17
  [d96e819e] + Parameters v0.12.3
  [69de0a69] + Parsers v2.7.1
  [fa939f87] + Pidfile v1.3.0
⌃ [f517fe37] + Polyester v0.7.2
  [1d0040c9] + PolyesterWeave v0.2.1
⌃ [d236fae5] + PreallocationTools v0.4.11
  [aea7be01] + PrecompileTools v1.1.2
  [21216c6a] + Preferences v1.4.0
  [8162dcfd] + PrettyPrint v0.2.0
  [33c8b6b6] + ProgressLogging v0.1.4
  [92933f4c] + ProgressMeter v1.7.2
  [6099a3de] + PythonCall v0.9.13
  [1fd47b50] + QuadGK v2.8.2
  [088c8dff] + QuanEstimation v0.1.3
  [74087812] + Random123 v1.6.1
  [e6cf234a] + RandomNumbers v1.5.3
  [c84ed2f1] + Ratios v0.4.5
  [c1ae055f] + RealDot v0.1.0
  [3cdcf5f2] + RecipesBase v1.3.4
⌃ [731186ca] + RecursiveArrayTools v2.37.0
  [f2c3362d] + RecursiveFactorization v0.2.18
  [189a3867] + Reexport v1.2.2
  [158674fc] + ReinforcementLearning v0.10.2
⌅ [e575027e] + ReinforcementLearningBase v0.9.7
⌅ [de1b191a] + ReinforcementLearningCore v0.8.12
⌅ [25e41dd2] + ReinforcementLearningEnvironments v0.6.12
⌅ [d607f57d] + ReinforcementLearningZoo v0.5.12
  [ae029012] + Requires v1.3.0
  [79098fc4] + Rmath v0.7.1
  [7e49a35a] + RuntimeGeneratedFunctions v0.5.11
  [c946c3f1] + SCS v1.2.1
  [94e857df] + SIMDTypes v0.1.0
  [476501e8] + SLEEFPirates v0.6.39
  [0bca4576] + SciMLBase v1.93.0
  [e9a6253c] + SciMLNLSolve v0.1.8
⌅ [c0aeaf25] + SciMLOperators v0.1.21
  [6c6a2e73] + Scratch v1.2.0
⌅ [efcf1570] + Setfield v0.8.2
  [605ecd9f] + ShowCases v0.1.0
⌃ [727e6d20] + SimpleNonlinearSolve v0.1.14
  [699a6c99] + SimpleTraits v0.9.4
  [66db9d55] + SnoopPrecompile v1.0.3
  [a2af1166] + SortingAlgorithms v1.1.1
⌅ [47a9eef4] + SparseDiffTools v1.30.0
  [e56a9233] + Sparspak v0.3.9
  [276daf66] + SpecialFunctions v2.3.0
  [171d559e] + SplittablesBase v0.1.15
  [860ef19b] + StableRNGs v1.0.0
  [aedffcd0] + Static v0.8.7
  [90137ffa] + StaticArrays v1.6.0
  [1e83bf80] + StaticArraysCore v1.4.0
  [82ae8749] + StatsAPI v1.6.0
⌅ [2913bbd2] + StatsBase v0.33.21
  [4c63d2b9] + StatsFuns v1.3.0
⌃ [7792a7ef] + StrideArraysCore v0.4.7
  [09ab397b] + StructArrays v0.6.15
  [856f2bd8] + StructTypes v1.10.0
  [2efcf032] + SymbolicIndexingInterface v0.2.2
  [3783bdb8] + TableTraits v1.0.1
  [bd369af6] + Tables v1.10.1
  [62fd8b95] + TensorCore v0.1.1
  [8290d209] + ThreadingUtilities v0.5.2
  [a759f4b9] + TimerOutputs v0.5.23
  [3bb67fe8] + TranscodingStreams v0.9.13
  [28d57a85] + Transducers v0.4.77
  [592b5752] + Trapz v2.0.3
  [d5829a12] + TriangularSolve v0.1.19
  [410a4b4d] + Tricks v0.1.7
  [781d530d] + TruncatedStacktraces v1.3.0
  [3a884ed6] + UnPack v1.0.2
⌅ [b8865327] + UnicodePlots v2.12.4
  [1986cc42] + Unitful v1.15.0
  [013be700] + UnsafeAtomics v0.2.1
⌃ [d80eeb9a] + UnsafeAtomicsLLVM v0.1.1
  [e17b2a0c] + UnsafePointers v1.0.0
⌃ [3d5dd08c] + VectorizationBase v0.21.58
  [19fa3120] + VertexSafeGraphs v0.2.0
  [efce3f68] + WoodburyMatrices v0.5.5
  [e88e6eb3] + Zygote v0.6.62
  [700de1a5] + ZygoteRules v0.2.3
  [6e34b625] + Bzip2_jll v1.0.8+0
  [5ae413db] + EarCut_jll v2.2.4+0
⌅ [d7e528f0] + FreeType2_jll v2.10.4+0
  [1d5cc7b8] + IntelOpenMP_jll v2023.1.0+0
⌅ [dad2f222] + LLVMExtra_jll v0.0.18+0
⌅ [856f044c] + MKL_jll v2022.2.0+0
⌅ [656ef2d0] + OpenBLAS32_jll v0.3.21+0
  [efe28fd5] + OpenSpecFun_jll v0.5.5+0
  [f50d1b31] + Rmath_jll v0.4.0+0
  [af6e375f] + SCS_GPU_jll v3.2.3+1
  [3f2553a9] + SCS_MKL_jll v3.2.3+1
  [f4f2fc5b] + SCS_jll v3.2.3+0
⌅ [f8abcde7] + micromamba_jll v1.4.1+0
  [0dad84c5] + ArgTools v1.1.1
  [56f22d72] + Artifacts
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [8ba89e20] + Distributed
  [f43a241f] + Downloads v1.6.0
  [7b1f6079] + FileWatching
  [9fa8497b] + Future
  [b77e0a4c] + InteractiveUtils
  [4af54fe1] + LazyArtifacts
  [b27032c2] + LibCURL v0.6.3
  [76f85450] + LibGit2
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [a63ad114] + Mmap
  [ca575930] + NetworkOptions v1.2.0
  [44cfe95a] + Pkg v1.9.2
  [de0858da] + Printf
  [9abbd945] + Profile
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA v0.7.0
  [9e88b42a] + Serialization
  [1a1011a3] + SharedArrays
  [6462fe0b] + Sockets
  [2f01184e] + SparseArrays
  [10745b16] + Statistics v1.9.0
  [4607b0f0] + SuiteSparse
  [fa267f1f] + TOML v1.0.3
  [a4e569a6] + Tar v1.10.0
  [8dfed614] + Test
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode
  [e66e0078] + CompilerSupportLibraries_jll v1.0.5+0
  [deac9b47] + LibCURL_jll v7.84.0+0
  [29816b5a] + LibSSH2_jll v1.10.2+0
  [c8ffd9c3] + MbedTLS_jll v2.28.2+0
  [14a3606d] + MozillaCACerts_jll v2022.10.11
  [4536629a] + OpenBLAS_jll v0.3.21+4
  [05823500] + OpenLibm_jll v0.8.1+0
  [bea87d4a] + SuiteSparse_jll v5.10.1+6
  [83775a58] + Zlib_jll v1.2.13+0
  [8e850b90] + libblastrampoline_jll v5.8.0+0
  [8e850ede] + nghttp2_jll v1.48.0+0
  [3f19e933] + p7zip_jll v17.4.0+0
        Info Packages marked with ⌃ and ⌅ have new versions available, but those with ⌅ are restricted by compatibility constraints from upgrading. To see why use `status --outdated -m`
Precompiling project...
  ✓ UnPack
  ✓ ADTypes
  ✓ MuladdMacro
  ✓ StatsAPI
  ✓ Tricks
  ✓ CEnum
  ✓ TensorCore
  ✓ ExprTools
  ✓ AMD
  ✓ AbstractFFTs
  ✓ Calculus
  ✓ FunctionWrappers
  ✓ CommonSolve
  ✓ InitialValues
  ✓ PrettyPrint
  ✓ ArgCheck
  ✓ WoodburyMatrices
  ✓ InverseFunctions
  ✓ ShowCases
  ✓ ManualMemory
  ✓ GenericSchur
  ✓ EnumX
  ✓ RealDot
  ✓ IterTools
  ✓ Reexport
  ✓ SIMDTypes
  ✓ StableRNGs
  ✓ DocStringExtensions
  ✓ UnsafeAtomics
  ✓ Trapz
  ✓ BFloat16s
  ✓ CompositionsBase
  ✓ AbstractTrees
  ✓ Extents
  ✓ DefineSingletons
  ✓ LazyModules
  ✓ ProgressMeter
  ✓ Ratios
  ✓ NaNMath
  ✓ IfElse
  ✓ DelimitedFiles
  ✓ IrrationalConstants
  ✓ TranscodingStreams
  ✓ Inflate
  ✓ CpuId
  ✓ ConstructionBase
  ✓ Adapt
  ✓ FastClosures
  ✓ ProgressLogging
  ✓ StaticArraysCore
  ✓ Functors
  ✓ Missings
  ✓ Lazy
  ✓ SimpleTraits
  ✓ IRTools
  ✓ PDMats
  ✓ Crayons
  ✓ Baselet
  ✓ CommonSubexpressions
  ✓ TruncatedStacktraces
  ✓ SnoopPrecompile
  ✓ FastLapackInterface
  ✓ KLU
  ✓ FillArrays
  ✓ Bzip2_jll
  ✓ OpenBLAS32_jll
  ✓ Rmath_jll
  ✓ IntelOpenMP_jll
  ✓ EarCut_jll
  ✓ RandomNumbers
  ✓ OpenSpecFun_jll
  ✓ Parameters
  ✓ LLVMExtra_jll
  ✓ Krylov
  ✓ CommonRLInterface
  ✓ RuntimeGeneratedFunctions
  ✓ FunctionWrappersWrappers
  ✓ Distances
  ✓ LDLFactorizations
  ✓ RecipesBase
  ✓ BenchmarkTools
  ✓ NameResolution
  ✓ AxisAlgorithms
  ✓ SymbolicIndexingInterface
  ✓ Atomix
  ✓ CompositionsBase → CompositionsBaseInverseFunctionsExt
  ✓ MutableArithmetics
  ✓ CodecZlib
  ✓ ThreadingUtilities
  ✓ ElasticArrays
  ✓ LogExpFunctions
  ✓ DiffResults
  ✓ Static
  ✓ Compat
  ✓ GeoInterface
  ✓ FixedPointNumbers
  ✓ CodecBzip2
  ✓ FreeType2_jll
  ✓ ArrayInterfaceCore
  ✓ SCS_GPU_jll
  ✓ FileIO
  ✓ SCS_jll
  ✓ MKL_jll
  ✓ Rmath
  ✓ LogExpFunctions → LogExpFunctionsInverseFunctionsExt
  ✓ BitTwiddlingConvenienceFunctions
  ✓ ContextVariablesX
  ✓ Random123
  ✓ TimerOutputs
  ✓ ReinforcementLearningBase
  ✓ Ratios → RatiosFixedPointNumbersExt
  ✓ ArrayInterfaceStaticArraysCore
  ✓ SCS_MKL_jll
  ✓ CPUSummary
  ✓ IterativeSolvers
  ✓ FLoopsBase
  ✓ FreeType
  ✓ ChainRulesCore
  ✓ HostCPUFeatures
  ✓ AbstractFFTs → AbstractFFTsChainRulesCoreExt
  ✓ PolyesterWeave
  ✓ ArrayInterface
  ✓ DataStructures
  ✓ Optimisers
  ✓ ZygoteRules
  ✓ EllipsisNotation
  ✓ CloseOpenIntervals
  ✓ LogExpFunctions → LogExpFunctionsChainRulesCoreExt
  ✓ SortingAlgorithms
  ✓ ColorTypes
  ✓ QuadGK
  ✓ IntervalSets
  ✓ ConstructionBase → ConstructionBaseIntervalSetsExt
  ✓ ArrayLayouts
  ✓ StatsBase
  ✓ LLVM
  ✓ SpecialFunctions
  ✓ DiffRules
  ✓ StaticArrays
  ✓ DualNumbers
  ✓ UnsafeAtomicsLLVM
  ✓ ReinforcementLearningEnvironments
  ✓ SpecialFunctions → SpecialFunctionsChainRulesCoreExt
  ✓ Adapt → AdaptStaticArraysExt
  ✓ StaticArrays → StaticArraysStatisticsExt
  ✓ ConstructionBase → ConstructionBaseStaticArraysExt
  ✓ Colors
  ✓ CircularArrayBuffers
  ✓ GPUArraysCore
  ✓ ArnoldiMethod
  ✓ HypergeometricFunctions
  ✓ Contour
  ✓ ArrayInterfaceStaticArrays
  ✓ OffsetArrays
  ✓ Setfield
  ✓ ArrayInterfaceGPUArrays
  ✓ StructArrays
  ✓ ColorVectorSpace
  ✓ ArrayInterfaceOffsetArrays
  ✓ Accessors
  ✓ Sparspak
  ✓ GPUArrays
  ✓ RecursiveArrayTools
  ✓ ForwardDiff
  ✓ SplittablesBase
  ✓ KrylovKit
  ✓ StatsFuns
  ✓ BangBang
  ✓ Accessors → AccessorsStructArraysExt
  ✓ SciMLOperators
  ✓ Accessors → AccessorsIntervalSetsExt
  ✓ KernelAbstractions
  ✓ FiniteDiff
  ✓ Interpolations
  ✓ StatsFuns → StatsFunsInverseFunctionsExt
  ✓ LayoutPointers
  ✓ MarchingCubes
  ✓ Accessors → AccessorsStaticArraysExt
  ✓ BangBang → BangBangChainRulesCoreExt
  ✓ ForwardDiff → ForwardDiffStaticArraysExt
  ✓ BangBang → BangBangStructArraysExt
  ✓ BangBang → BangBangStaticArraysExt
  ✓ StatsFuns → StatsFunsChainRulesCoreExt
  ✓ Graphs
  ✓ PreallocationTools
  ✓ MicroCollections
  ✓ NLSolversBase
....
....
  ✓ SimpleNonlinearSolve
  ✓ MLUtils
  ✓ GPUCompiler
  ✓ SimpleNonlinearSolve → SimpleBatchedNonlinearSolveExt
  ✓ Unitful
  ✓ Unitful → InverseFunctionsUnitfulExt
  ✓ Unitful → ConstructionBaseUnitfulExt
  ✓ BandedMatrices
  ✓ DiffEqBase → DiffEqBaseUnitfulExt
  ✓ ExponentialUtilities
  ✓ UnicodePlots
  ✓ LoopVectorization
  ✓ Zygote
  ✓ LoopVectorization → SpecialFunctionsExt
  ✓ Zygote → ZygoteColorsExt
  ✓ Zygote → ZygoteDistancesExt
  ✓ DiffEqBase → DiffEqBaseZygoteExt
  ✓ LoopVectorization → ForwardDiffExt
  ✓ TriangularSolve
  ✓ BoundaryValueDiffEq
  ✓ CUDA
  ✓ NNlibCUDA
  ✓ RecursiveFactorization
  ✓ Flux
  ✓ LinearSolve
  ✓ ReinforcementLearningCore
  ✓ NonlinearSolve
  ✓ ReinforcementLearningZoo
  ✓ MathOptInterface
  ✓ ReinforcementLearning
  ✓ SCS
  ✓ Convex
✓ OrdinaryDiffEq
  ✓ QuanEstimation
  245 dependencies successfully precompiled in 256 seconds. 30 already precompiled.
  4 dependencies had warnings during precompilation:
┌ Interpolations [a98d9a8b-a2ab-59e6-89dd-64a1c18fca59]
│  WARNING: method definition for checkbounds at /home/admin/.julia/packages/Interpolations/y4lLj/src/Interpolations.jl:454 declares type variable N but does not use it.
│  WARNING: method definition for checkbounds at /home/admin/.julia/packages/Interpolations/y4lLj/src/Interpolations.jl:457 declares type variable N but does not use it.
│  WARNING: method definition for GriddedInterpolation at /home/admin/.julia/packages/Interpolations/y4lLj/src/gridded/gridded.jl:37 declares type variable pad but does not use it.
│  WARNING: method definition for GriddedInterpolation at /home/admin/.julia/packages/Interpolations/y4lLj/src/gridded/gridded.jl:60 declares type variable pad but does not use it.
│  WARNING: method definition for interpolate! at /home/admin/.julia/packages/Interpolations/y4lLj/src/deprecations.jl:30 declares type variable TWeights but does not use it.
└  
┌ BFloat16s [ab4f0b2a-ad5b-11e8-123f-65d77653426b]
│  WARNING: could not import Printf.ini_hex into BFloat16s
│  WARNING: could not import Printf.ini_HEX into BFloat16s
└  
┌ QuanEstimation [088c8dff-a786-4a66-974c-03d3f6773f87]
│  WARNING: method definition for dissipation at /home/admin/.julia/packages/QuanEstimation/ewOkL/src/Parameterization/Lindblad/LindbladDynamics.jl:53 declares type variable T but does not use it.
│  WARNING: method definition for dissipation at /home/admin/.julia/packages/QuanEstimation/ewOkL/src/Parameterization/Lindblad/LindbladDynamics.jl:61 declares type variable T but does not use it.
│  WARNING: method definition for Htot at /home/admin/.julia/packages/QuanEstimation/ewOkL/src/Parameterization/Lindblad/LindbladDynamics.jl:84 declares type variable R but does not use it.
│  WARNING: Method definition copyto!(ReinforcementLearningCore.NeuralNetworkApproximator{M, O} where O where M, ReinforcementLearningCore.NeuralNetworkApproximator{M, O} where O where M) in module ReinforcementLearningCore at /home/admin/.julia/packages/ReinforcementLearningCore/yeRLW/src/policies/q_based_policies/learners/approximators/neural_network_approximator.jl:40 overwritten in module QuanEstimation at /home/admin/.julia/packages/QuanEstimation/ewOkL/src/Algorithm/DDPG.jl:6.
│    ** incremental compilation may be fatally broken for this module **
└  
┌ SciMLOperators [c0aeaf25-5076-4817-a8d5-81caf7dfa961]
│  ┌ Warning: Replacing docs for `SciMLOperators.AbstractSciMLOperator :: Union{}` in module `SciMLOperators`
│  └ @ Base.Docs docs/Docs.jl:243
└  
Exception when compiling system image.
  Activating project at `/opt/anaconda3/julia_project/quanestimation-1.9.2`
Initialization failed. You may try running again
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/admin/.local/lib/python3.9/site-packages/quanestimation/__init__.py", line 9, in <module>
    project.ensure_init()
  File "/home/admin/.local/lib/python3.9/site-packages/julia_project/_julia_project.py", line 278, in ensure_init
    self.init()
  File "/home/admin/.local/lib/python3.9/site-packages/julia_project/_julia_project.py", line 433, in init
    self.compile()
  File "/home/admin/.local/lib/python3.9/site-packages/julia_project/_julia_project.py", line 586, in compile
    self.julia_system_image.compile()
  File "/home/admin/.local/lib/python3.9/site-packages/julia_project/julia_system_image.py", line 69, in compile
    self._compile()
  File "/home/admin/.local/lib/python3.9/site-packages/julia_project/julia_system_image.py", line 104, in _compile
    raise FileNotFoundError(msg)
FileNotFoundError: Can't find directory for compiling system image: /opt/anaconda3/julia_project/quanestimation-1.9.2/sys_image
>>> 

if I try again:

>>> import quanestimation
free(): invalid pointer
Aborted (core dumped)

😭

hmyuuu commented 1 year ago

import quanestimation on MacOS similar problem happens on Ubuntu

can you try python-jl command instead of normal python before import? This will launch a Python interpreter inside Julia as indicated in the pyjulia docs.

Papageno2 commented 1 year ago
~$ python-jl
Python 3.9.13 (main, Aug 25 2022, 23:35:15) 
[GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import quanestimation

I can compile a system image after installation.
Compilation may take a few, or many, minutes. You may compile now, later, or never.
Would you like to compile a system image after installation?
 [Y/n] y

You can install all of the Julia packages and package information in a
module-specific "depot", that is, one specific to this Python module. This may
allow you to use Julia with python projects that have different Python
installation locations.  If you answer "no", packages will be installed in the
standard per-user Julia "depot".

Would you like to use a python-module-specific depot for Julia packages?
 [Y/n] y
Installing general registry
  Activating project at `/opt/anaconda3/julia_project/quanestimation-1.9.2`
Instantiating project...
  Activating project at `/opt/anaconda3/julia_project/quanestimation-1.9.2`
    Updating registry at `/opt/anaconda3/julia_project/quanestimation-1.9.2/depot/registries/General.toml`
   Resolving package versions...
   Installed Calculus ────────────────────────── v0.5.1
   Installed OffsetArrays ────────────────────── v1.12.10
   Installed HypergeometricFunctions ─────────── v0.3.17
   Installed ShowCases ───────────────────────── v0.1.0
   Installed ContextVariablesX ───────────────── v0.1.3
   Installed SCS ─────────────────────────────── v1.2.1
   Installed NonlinearSolve ──────────────────── v1.6.0
   Installed Accessors ───────────────────────── v0.1.31
   Installed MutableArithmetics ──────────────── v1.3.0
   Installed StatsFuns ───────────────────────── v1.3.0
....
....

 ✓ ReinforcementLearningZoo
  ✓ MathOptInterface
  ✓ SCS
  ✓ ReinforcementLearning
  ✓ Convex
  ✓ OrdinaryDiffEq
  ✓ QuanEstimation
  272 dependencies successfully precompiled in 325 seconds. 6 already precompiled.
  5 dependencies had warnings during precompilation:
┌ Interpolations [a98d9a8b-a2ab-59e6-89dd-64a1c18fca59]
│  WARNING: method definition for checkbounds at /opt/anaconda3/julia_project/quanestimation-1.9.2/depot/packages/Interpolations/y4lLj/src/Interpolations.jl:454 declares type variable N but does not use it.
│  WARNING: method definition for checkbounds at /opt/anaconda3/julia_project/quanestimation-1.9.2/depot/packages/Interpolations/y4lLj/src/Interpolations.jl:457 declares type variable N but does not use it.
│  WARNING: method definition for GriddedInterpolation at /opt/anaconda3/julia_project/quanestimation-1.9.2/depot/packages/Interpolations/y4lLj/src/gridded/gridded.jl:37 declares type variable pad but does not use it.
│  WARNING: method definition for GriddedInterpolation at /opt/anaconda3/julia_project/quanestimation-1.9.2/depot/packages/Interpolations/y4lLj/src/gridded/gridded.jl:60 declares type variable pad but does not use it.
│  WARNING: method definition for interpolate! at /opt/anaconda3/julia_project/quanestimation-1.9.2/depot/packages/Interpolations/y4lLj/src/deprecations.jl:30 declares type variable TWeights but does not use it.
└  
┌ BFloat16s [ab4f0b2a-ad5b-11e8-123f-65d77653426b]
│  WARNING: could not import Printf.ini_hex into BFloat16s
│  WARNING: could not import Printf.ini_HEX into BFloat16s
└  
┌ QuanEstimation [088c8dff-a786-4a66-974c-03d3f6773f87]
│  WARNING: method definition for dissipation at /opt/anaconda3/julia_project/quanestimation-1.9.2/depot/packages/QuanEstimation/ewOkL/src/Parameterization/Lindblad/LindbladDynamics.jl:53 declares type variable T but does not use it.
│  WARNING: method definition for dissipation at /opt/anaconda3/julia_project/quanestimation-1.9.2/depot/packages/QuanEstimation/ewOkL/src/Parameterization/Lindblad/LindbladDynamics.jl:61 declares type variable T but does not use it.
│  WARNING: method definition for Htot at /opt/anaconda3/julia_project/quanestimation-1.9.2/depot/packages/QuanEstimation/ewOkL/src/Parameterization/Lindblad/LindbladDynamics.jl:84 declares type variable R but does not use it.
│  WARNING: Method definition copyto!(ReinforcementLearningCore.NeuralNetworkApproximator{M, O} where O where M, ReinforcementLearningCore.NeuralNetworkApproximator{M, O} where O where M) in module ReinforcementLearningCore at /opt/anaconda3/julia_project/quanestimation-1.9.2/depot/packages/ReinforcementLearningCore/yeRLW/src/policies/q_based_policies/learners/approximators/neural_network_approximator.jl:40 overwritten in module QuanEstimation at /opt/anaconda3/julia_project/quanestimation-1.9.2/depot/packages/QuanEstimation/ewOkL/src/Algorithm/DDPG.jl:6.
│    ** incremental compilation may be fatally broken for this module **
└  
┌ MicroMamba [0b3b1443-0f03-428d-bdfb-f27f9c1191ea]
│  Downloading artifact: micromamba
└  
┌ SciMLOperators [c0aeaf25-5076-4817-a8d5-81caf7dfa961]
│  ┌ Warning: Replacing docs for `SciMLOperators.AbstractSciMLOperator :: Union{}` in module `SciMLOperators`
│  └ @ Base.Docs docs/Docs.jl:243
└  
Exception when compiling system image.
  Activating project at `~/.julia/environments/v1.9`
Initialization failed. You may try running again
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/home/admin/.local/lib/python3.9/site-packages/quanestimation/__init__.py", line 9, in <module>
    project.ensure_init()
  File "/home/admin/.local/lib/python3.9/site-packages/julia_project/_julia_project.py", line 278, in ensure_init
    self.init()
  File "/home/admin/.local/lib/python3.9/site-packages/julia_project/_julia_project.py", line 433, in init
    self.compile()
  File "/home/admin/.local/lib/python3.9/site-packages/julia_project/_julia_project.py", line 586, in compile
    self.julia_system_image.compile()
  File "/home/admin/.local/lib/python3.9/site-packages/julia_project/julia_system_image.py", line 69, in compile
    self._compile()
  File "/home/admin/.local/lib/python3.9/site-packages/julia_project/julia_system_image.py", line 104, in _compile
    raise FileNotFoundError(msg)
FileNotFoundError: Can't find directory for compiling system image: /opt/anaconda3/julia_project/quanestimation-1.9.2/sys_image
>>> 
Papageno2 commented 1 year ago

I found a file named quanestimation.log,

(base) :~$ cat quanestimation.log 
julia_project - INFO - 
julia_project - INFO - JuliaProject.init()
julia_project - INFO - QuanEstimation_INSTALL_JULIA not set
julia_project - INFO - QuanEstimation_COMPILE not set
julia_project - INFO - QuanEstimation_DEPOT not set
julia_project - INFO - julia path: /snap/bin/julia
julia_project - INFO - Julia version: 1.9.1.
julia_project - INFO - 
julia_project - INFO - JuliaProject.init()
julia_project - INFO - QuanEstimation_INSTALL_JULIA not set
julia_project - INFO - QuanEstimation_COMPILE not set
julia_project - INFO - QuanEstimation_DEPOT not set
julia_project - INFO - julia path: /snap/bin/julia
julia_project - INFO - Julia version: 1.9.1.
julia_project - INFO - 
julia_project - INFO - JuliaProject.init()
julia_project - INFO - QuanEstimation_INSTALL_JULIA not set
julia_project - INFO - QuanEstimation_COMPILE not set
julia_project - INFO - QuanEstimation_DEPOT not set
julia_project - INFO - julia path: /snap/bin/julia
julia_project - INFO - Julia version: 1.9.1.
julia_project - INFO - 
julia_project - INFO - 
julia_project - INFO - JuliaProject.init()
julia_project - INFO - JuliaProject.init()
julia_project - INFO - QuanEstimation_INSTALL_JULIA not set
julia_project - INFO - QuanEstimation_INSTALL_JULIA not set
julia_project - INFO - QuanEstimation_COMPILE not set
julia_project - INFO - QuanEstimation_COMPILE not set
julia_project - INFO - QuanEstimation_DEPOT not set
julia_project - INFO - QuanEstimation_DEPOT not set
julia_project - INFO - julia path: /snap/bin/julia
julia_project - INFO - julia path: /snap/bin/julia
julia_project - INFO - Julia version: 1.9.1.
julia_project - INFO - Julia version: 1.9.1.
julia_project - INFO - 
julia_project - INFO - JuliaProject.init()
julia_project - INFO - QuanEstimation_INSTALL_JULIA not set
julia_project - INFO - QuanEstimation_COMPILE not set
julia_project - INFO - QuanEstimation_DEPOT not set
julia_project - INFO - julia path: /snap/bin/julia
julia_project - INFO - Julia version: 1.9.1.
julia_project - INFO - 
julia_project - INFO - JuliaProject.init()
julia_project - INFO - QuanEstimation_INSTALL_JULIA not set
julia_project - INFO - QuanEstimation_COMPILE not set
julia_project - INFO - QuanEstimation_DEPOT not set
julia_project - INFO - julia path: /snap/bin/julia
julia_project - INFO - Julia version: 1.9.1.
julia_project - INFO - 
julia_project - INFO - JuliaProject.init()
julia_project - INFO - QuanEstimation_INSTALL_JULIA not set
julia_project - INFO - QuanEstimation_COMPILE not set
julia_project - INFO - QuanEstimation_DEPOT not set
julia_project - INFO - julia path: /snap/bin/julia
julia_project - INFO - Julia version: 1.9.1.
julia_project - INFO - os.environ["JULIA_PROJECT"] = /opt/anaconda3/julia_project/quanestimation-1.9.1
julia_project - INFO - System image dir source not found at /home/admin/.local/lib/python3.9/site-packages/quanestimation/Common/sys_image
julia_project - INFO - importing JuliaCall
julia_project - INFO - 
julia_project - INFO - JuliaProject.init()
julia_project - INFO - QuanEstimation_INSTALL_JULIA not set
julia_project - INFO - QuanEstimation_COMPILE not set
julia_project - INFO - QuanEstimation_DEPOT not set
julia_project - INFO - julia path: /snap/bin/julia
julia_project - INFO - Julia version: 1.9.1.
julia_project - INFO - os.environ["JULIA_PROJECT"] = /opt/anaconda3/julia_project/quanestimation-1.9.1
julia_project - INFO - System image dir source not found at /home/admin/.local/lib/python3.9/site-packages/quanestimation/Common/sys_image
julia_project - INFO - importing JuliaCall
julia_project - INFO - 
julia_project - INFO - JuliaProject.init()
julia_project - INFO - QuanEstimation_INSTALL_JULIA not set
julia_project - INFO - QuanEstimation_COMPILE not set
julia_project - INFO - QuanEstimation_DEPOT not set
julia_project - INFO - julia path: /snap/bin/julia
julia_project - INFO - Julia version: 1.9.1.
julia_project - INFO - os.environ["JULIA_PROJECT"] = /opt/anaconda3/julia_project/quanestimation-1.9.1
julia_project - INFO - System image dir source not found at /home/admin/.local/lib/python3.9/site-packages/quanestimation/Common/sys_image
julia_project - INFO - importing JuliaCall
julia_project.juliacall - INFO - importing julia_project/juliacall
julia_project.basic - INFO - need_resolve: No Manifest.toml
julia_project.basic - INFO - Want packages in project: ['PythonCall']
julia_project.basic - INFO - Need to add packages not in project: ['PythonCall']
julia_project - INFO - Question 'compile', answered True
julia_project.basic - INFO - ensure_project_ready:  project /opt/anaconda3/julia_project/quanestimation-1.9.1, depot None
julia_project.basic - INFO - Want packages in project: ['PythonCall']
julia_project.basic - INFO - Need to add packages not in project: ['PythonCall']
julia_project.basic - INFO - need_resolve: No Manifest.toml
julia_project.basic - INFO - Installing or instantiating project: project /opt/anaconda3/julia_project/quanestimation-1.9.1, depot None
julia_project.basic - INFO - Instantiating project...
julia_project.basic - INFO - import Pkg; Pkg.activate("/opt/anaconda3/julia_project/quanestimation-1.9.1"); Pkg.add("PythonCall");; Pkg.instantiate()
julia_project - INFO - Using default depot.
julia_project.juliacall - INFO - CONFIG['inited'] is true, but we are not reall initialized.
julia_project.juliacall - INFO - Initializing julia.
julia_project.juliacall - INFO - libjulia_path: /snap/julia/80/lib/libjulia.so.1
julia_project.juliacall - INFO - setting JULIA_PROJECT = /opt/anaconda3/julia_project/quanestimation-1.9.1
julia_project.juliacall - INFO - jl_init with default system image
julia_project.juliacall - INFO - libjulia inited.
julia_project.juliacall - INFO - Activating project
julia_project.juliacall - INFO - Done juliacall init .....
julia_project - INFO - PyCall version: None
julia_project - INFO - PythonCall version: 0.9.13
julia_project - INFO - 
julia_project - INFO - JuliaProject.init()
julia_project - INFO - QuanEstimation_INSTALL_JULIA not set
julia_project - INFO - QuanEstimation_COMPILE not set
julia_project - INFO - QuanEstimation_DEPOT not set
julia_project - INFO - julia path: /snap/bin/julia
julia_project - INFO - Julia version: 1.9.1.
julia_project - INFO - os.environ["JULIA_PROJECT"] = /opt/anaconda3/julia_project/quanestimation-1.9.1
julia_project - INFO - System image dir source not found at /home/admin/.local/lib/python3.9/site-packages/quanestimation/Common/sys_image
julia_project - INFO - importing JuliaCall
julia_project.juliacall - INFO - importing julia_project/juliacall
julia_project.basic - INFO - need_resolve: No need to resolve or instantiate found.
julia_project.basic - INFO - Want packages in project: ['PythonCall']
julia_project.basic - INFO - Need to add packages not in project: []
julia_project.basic - INFO - ensure_project_ready:  project /opt/anaconda3/julia_project/quanestimation-1.9.1, depot None
julia_project.basic - INFO - Want packages in project: ['PythonCall']
julia_project.basic - INFO - Need to add packages not in project: []
julia_project.basic - INFO - need_resolve: No need to resolve or instantiate found.
julia_project.basic - INFO - Project needs no installation or updating
julia_project - INFO - Using default depot.
julia_project.juliacall - INFO - CONFIG['inited'] is true, but we are not reall initialized.
julia_project.juliacall - INFO - Initializing julia.
julia_project.juliacall - INFO - libjulia_path: /snap/julia/80/lib/libjulia.so.1
julia_project.juliacall - INFO - setting JULIA_PROJECT = /opt/anaconda3/julia_project/quanestimation-1.9.1
julia_project.juliacall - INFO - jl_init with default system image
julia_project.juliacall - INFO - libjulia inited.
julia_project.juliacall - INFO - Activating project
julia_project.juliacall - INFO - Done juliacall init .....
julia_project - INFO - PyCall version: None
julia_project - INFO - PythonCall version: 0.9.13
julia_project - INFO - 
julia_project - INFO - JuliaProject.init()
julia_project - INFO - QuanEstimation_INSTALL_JULIA not set
julia_project - INFO - QuanEstimation_COMPILE not set
julia_project - INFO - QuanEstimation_DEPOT not set
julia_project - INFO - julia path: /snap/bin/julia
julia_project - INFO - Julia version: 1.9.1.
julia_project - INFO - os.environ["JULIA_PROJECT"] = /opt/anaconda3/julia_project/quanestimation-1.9.1
julia_project - INFO - System image dir source not found at /home/admin/.local/lib/python3.9/site-packages/quanestimation/Common/sys_image
julia_project - INFO - importing JuliaCall
julia_project.juliacall - INFO - importing julia_project/juliacall
julia_project.basic - INFO - need_resolve: No need to resolve or instantiate found.
julia_project.basic - INFO - Want packages in project: ['PythonCall']
julia_project.basic - INFO - Need to add packages not in project: []
julia_project.basic - INFO - ensure_project_ready:  project /opt/anaconda3/julia_project/quanestimation-1.9.1, depot None
julia_project.basic - INFO - Want packages in project: ['PythonCall']
julia_project.basic - INFO - Need to add packages not in project: []
julia_project.basic - INFO - need_resolve: No need to resolve or instantiate found.
julia_project.basic - INFO - Project needs no installation or updating
julia_project - INFO - Using default depot.
julia_project.juliacall - INFO - CONFIG['inited'] is true, but we are not reall initialized.
julia_project.juliacall - INFO - Initializing julia.
julia_project.juliacall - INFO - libjulia_path: /snap/julia/80/lib/libjulia.so.1
julia_project.juliacall - INFO - setting JULIA_PROJECT = /opt/anaconda3/julia_project/quanestimation-1.9.1
julia_project.juliacall - INFO - jl_init with default system image
julia_project.juliacall - INFO - libjulia inited.
julia_project.juliacall - INFO - Activating project
julia_project.juliacall - INFO - Done juliacall init .....
julia_project - INFO - PyCall version: None
julia_project - INFO - PythonCall version: 0.9.13
julia_project - INFO - 
julia_project - INFO - JuliaProject.init()
julia_project - INFO - QuanEstimation_INSTALL_JULIA not set
julia_project - INFO - QuanEstimation_COMPILE not set
julia_project - INFO - QuanEstimation_DEPOT not set
julia_project - INFO - julia path: /snap/bin/julia
julia_project - INFO - Julia version: 1.9.1.
julia_project - INFO - os.environ["JULIA_PROJECT"] = /opt/anaconda3/julia_project/quanestimation-1.9.1
julia_project - INFO - System image dir source not found at /home/admin/.local/lib/python3.9/site-packages/quanestimation/Common/sys_image
julia_project - INFO - importing PyJulia
julia_project.basic - INFO - need_resolve: No need to resolve or instantiate found.
julia_project.basic - INFO - Want packages in project: ['PyCall']
julia_project.basic - INFO - Need to add packages not in project: ['PyCall']
julia_project - INFO - Question 'compile', answered True
julia_project - INFO - Question 'depot', answered True
julia_project.basic - INFO - Trial 1: ensure_project_ready
julia_project.basic - INFO - ensure_project_ready:  project /opt/anaconda3/julia_project/quanestimation-1.9.1, depot /opt/anaconda3/julia_project/quanestimation-1.9.1/depot
julia_project.basic - INFO - Want packages in project: ['PyCall']
julia_project.basic - INFO - Need to add packages not in project: ['PyCall']
julia_project.basic - INFO - need_resolve: No need to resolve or instantiate found.
julia_project.basic - INFO - Installing or instantiating project: project /opt/anaconda3/julia_project/quanestimation-1.9.1, depot /opt/anaconda3/julia_project/quanestimation-1.9.1/depot
julia_project.basic - INFO - Running pre_install_callback.
julia_project.basic - INFO - Installing general registry
julia_project.basic - INFO - import Pkg; Pkg.activate("/opt/anaconda3/julia_project/quanestimation-1.9.1"); Pkg.Registry.add("General")
julia_project.basic - INFO - Instantiating project...
julia_project.basic - INFO - import Pkg; Pkg.activate("/opt/anaconda3/julia_project/quanestimation-1.9.1"); Pkg.add("PyCall");; Pkg.instantiate()
julia_project.basic - INFO - import Pkg; Pkg.activate("/opt/anaconda3/julia_project/quanestimation-1.9.1"); include_string(Main, """
function  get_pycall_libpython()
    pycall_jl = Base.find_package("PyCall")
    if isnothing(pycall_jl)
        return (nothing, nothing, "not installed")
    end
    deps_jl = joinpath(dirname(dirname(pycall_jl)), "deps", "deps.jl")
    if ! isfile(deps_jl)
        return (nothing, nothing, "not built")
    end
    include(deps_jl) # not a great way to do this
    return (libpython, python, "ok")
end
"""); res = get_pycall_libpython(); print(res[1],",",res[2],",",res[3])
julia_project - INFO - Using private depot '/opt/anaconda3/julia_project/quanestimation-1.9.1/depot'
julia_project.pyjulia - INFO - Loaded JuliaInfo.
julia_project.pyjulia - INFO - is_pycall_built = True
julia_project.pyjulia - INFO - is_compatible_python = True
julia_project.pyjulia - INFO - Loaded LibJulia.
julia_project.pyjulia - INFO - No custom system image found: /opt/anaconda3/julia_project/quanestimation-1.9.1/sys_image/sys_quanestimation-1.9.1.so.
julia_project.pyjulia - INFO - Initializing julia
julia_project.pyjulia - INFO - api.init_julia() done
julia_project.pyjulia - INFO - PyCall, Base, and Main imported
julia_project - INFO - PyCall version: 1.96.1
julia_project - INFO - PythonCall version: None
julia_project - INFO - 
julia_project - INFO - JuliaProject.init()
julia_project - INFO - QuanEstimation_INSTALL_JULIA not set
julia_project - INFO - QuanEstimation_COMPILE not set
julia_project - INFO - QuanEstimation_DEPOT not set
julia_project - INFO - julia path: /snap/bin/julia
julia_project - INFO - Julia version: 1.9.1.
julia_project - INFO - os.environ["JULIA_PROJECT"] = /opt/anaconda3/julia_project/quanestimation-1.9.1
julia_project - INFO - System image dir source not found at /home/admin/.local/lib/python3.9/site-packages/quanestimation/Common/sys_image
julia_project - INFO - Found existing Python-project specific Julia depot
julia_project - INFO - importing JuliaCall
julia_project.juliacall - INFO - importing julia_project/juliacall
julia_project.basic - INFO - need_resolve: No need to resolve or instantiate found.
julia_project.basic - INFO - Want packages in project: ['PythonCall']
julia_project.basic - INFO - Need to add packages not in project: []
julia_project.basic - INFO - ensure_project_ready:  project /opt/anaconda3/julia_project/quanestimation-1.9.1, depot /opt/anaconda3/julia_project/quanestimation-1.9.1/depot
julia_project.basic - INFO - Want packages in project: ['PythonCall']
julia_project.basic - INFO - Need to add packages not in project: []
julia_project.basic - INFO - need_resolve: No need to resolve or instantiate found.
julia_project.basic - INFO - Project needs no installation or updating
julia_project - INFO - Using private depot '/opt/anaconda3/julia_project/quanestimation-1.9.1/depot'
julia_project.juliacall - INFO - CONFIG['inited'] is true, but we are not reall initialized.
julia_project.juliacall - INFO - Initializing julia.
julia_project.juliacall - INFO - libjulia_path: /snap/julia/80/lib/libjulia.so.1
julia_project.juliacall - INFO - setting JULIA_PROJECT = /opt/anaconda3/julia_project/quanestimation-1.9.1
julia_project.juliacall - INFO - jl_init with default system image
julia_project.juliacall - INFO - libjulia inited.
julia_project.juliacall - INFO - Activating project
julia_project.juliacall - INFO - Done juliacall init .....
julia_project - INFO - PyCall version: None
julia_project - INFO - PythonCall version: 0.9.13
julia_project - INFO - 
julia_project - INFO - JuliaProject.init()
julia_project - INFO - QuanEstimation_INSTALL_JULIA not set
julia_project - INFO - QuanEstimation_COMPILE not set
julia_project - INFO - QuanEstimation_DEPOT not set
julia_project - INFO - julia path: /snap/bin/julia
julia_project - INFO - Julia version: 1.9.1.
julia_project - INFO - os.environ["JULIA_PROJECT"] = /opt/anaconda3/julia_project/quanestimation-1.9.1
julia_project - INFO - System image dir source not found at /home/admin/.local/lib/python3.9/site-packages/quanestimation/Common/sys_image
julia_project - INFO - Found existing Python-project specific Julia depot
julia_project - INFO - importing JuliaCall
julia_project.juliacall - INFO - importing julia_project/juliacall
julia_project.basic - INFO - need_resolve: No need to resolve or instantiate found.
julia_project.basic - INFO - Want packages in project: ['PythonCall']
julia_project.basic - INFO - Need to add packages not in project: []
julia_project.basic - INFO - ensure_project_ready:  project /opt/anaconda3/julia_project/quanestimation-1.9.1, depot /opt/anaconda3/julia_project/quanestimation-1.9.1/depot
julia_project.basic - INFO - Want packages in project: ['PythonCall']
julia_project.basic - INFO - Need to add packages not in project: []
julia_project.basic - INFO - need_resolve: No need to resolve or instantiate found.
julia_project.basic - INFO - Project needs no installation or updating
julia_project - INFO - Using private depot '/opt/anaconda3/julia_project/quanestimation-1.9.1/depot'
julia_project.juliacall - INFO - CONFIG['inited'] is true, but we are not reall initialized.
julia_project.juliacall - INFO - Initializing julia.
julia_project.juliacall - INFO - libjulia_path: /snap/julia/80/lib/libjulia.so.1
julia_project.juliacall - INFO - setting JULIA_PROJECT = /opt/anaconda3/julia_project/quanestimation-1.9.1
julia_project.juliacall - INFO - jl_init with default system image
julia_project.juliacall - INFO - libjulia inited.
julia_project.juliacall - INFO - Activating project
julia_project.juliacall - INFO - Done juliacall init .....
julia_project - INFO - PyCall version: None
julia_project - INFO - PythonCall version: 0.9.13
julia_project - INFO - 
julia_project - INFO - JuliaProject.init()
julia_project - INFO - QuanEstimation_INSTALL_JULIA not set
julia_project - INFO - QuanEstimation_COMPILE not set
julia_project - INFO - QuanEstimation_DEPOT not set
julia_project - INFO - julia path: /snap/bin/julia
julia_project - INFO - Julia version: 1.9.1.
julia_project - INFO - os.environ["JULIA_PROJECT"] = /opt/anaconda3/julia_project/quanestimation-1.9.1
julia_project - INFO - System image dir source not found at /home/admin/.local/lib/python3.9/site-packages/quanestimation/Common/sys_image
julia_project - INFO - Found existing Python-project specific Julia depot
julia_project - INFO - importing JuliaCall
julia_project.juliacall - INFO - importing julia_project/juliacall
julia_project.basic - INFO - need_resolve: No need to resolve or instantiate found.
julia_project.basic - INFO - Want packages in project: ['PythonCall']
julia_project.basic - INFO - Need to add packages not in project: []
julia_project.basic - INFO - ensure_project_ready:  project /opt/anaconda3/julia_project/quanestimation-1.9.1, depot /opt/anaconda3/julia_project/quanestimation-1.9.1/depot
julia_project.basic - INFO - Want packages in project: ['PythonCall']
julia_project.basic - INFO - Need to add packages not in project: []
julia_project.basic - INFO - need_resolve: No need to resolve or instantiate found.
julia_project.basic - INFO - Project needs no installation or updating
julia_project - INFO - Using private depot '/opt/anaconda3/julia_project/quanestimation-1.9.1/depot'
julia_project.juliacall - INFO - CONFIG['inited'] is true, but we are not reall initialized.
julia_project.juliacall - INFO - Initializing julia.
julia_project.juliacall - INFO - libjulia_path: /snap/julia/80/lib/libjulia.so.1
julia_project.juliacall - INFO - setting JULIA_PROJECT = /opt/anaconda3/julia_project/quanestimation-1.9.1
julia_project.juliacall - INFO - jl_init with default system image
julia_project.juliacall - INFO - libjulia inited.
julia_project.juliacall - INFO - Activating project
julia_project.juliacall - INFO - Done juliacall init .....
julia_project - INFO - PyCall version: None
julia_project - INFO - PythonCall version: 0.9.13
julia_project - INFO - 
julia_project - INFO - JuliaProject.init()
julia_project - INFO - QuanEstimation_INSTALL_JULIA not set
julia_project - INFO - QuanEstimation_COMPILE not set
julia_project - INFO - QuanEstimation_DEPOT not set
julia_project - INFO - julia path: /snap/bin/julia
julia_project - INFO - Julia version: 1.9.1.
julia_project - INFO - os.environ["JULIA_PROJECT"] = /opt/anaconda3/julia_project/quanestimation-1.9.1
julia_project - INFO - System image dir source not found at /home/admin/.local/lib/python3.9/site-packages/quanestimation/Common/sys_image
julia_project - INFO - Found existing Python-project specific Julia depot
julia_project - INFO - importing JuliaCall
julia_project.juliacall - INFO - importing julia_project/juliacall
julia_project.basic - INFO - need_resolve: No need to resolve or instantiate found.
julia_project.basic - INFO - Want packages in project: ['PythonCall']
julia_project.basic - INFO - Need to add packages not in project: []
julia_project.basic - INFO - ensure_project_ready:  project /opt/anaconda3/julia_project/quanestimation-1.9.1, depot /opt/anaconda3/julia_project/quanestimation-1.9.1/depot
julia_project.basic - INFO - Want packages in project: ['PythonCall']
julia_project.basic - INFO - Need to add packages not in project: []
julia_project.basic - INFO - need_resolve: No need to resolve or instantiate found.
julia_project.basic - INFO - Project needs no installation or updating
julia_project - INFO - Using private depot '/opt/anaconda3/julia_project/quanestimation-1.9.1/depot'
julia_project.juliacall - INFO - CONFIG['inited'] is true, but we are not reall initialized.
julia_project.juliacall - INFO - Initializing julia.
julia_project.juliacall - INFO - libjulia_path: /snap/julia/80/lib/libjulia.so.1
julia_project.juliacall - INFO - setting JULIA_PROJECT = /opt/anaconda3/julia_project/quanestimation-1.9.1
julia_project.juliacall - INFO - jl_init with default system image
julia_project.juliacall - INFO - libjulia inited.
julia_project.juliacall - INFO - Activating project
julia_project.juliacall - INFO - Done juliacall init .....
julia_project - INFO - PyCall version: None
julia_project - INFO - PythonCall version: 0.9.13
julia_project - INFO - 
julia_project - INFO - JuliaProject.init()
julia_project - INFO - QuanEstimation_INSTALL_JULIA not set
julia_project - INFO - QuanEstimation_COMPILE not set
julia_project - INFO - QuanEstimation_DEPOT not set
julia_project - INFO - julia path: /snap/bin/julia
julia_project - INFO - Julia version: 1.9.1.
julia_project - INFO - os.environ["JULIA_PROJECT"] = /opt/anaconda3/julia_project/quanestimation-1.9.1
julia_project - INFO - System image dir source not found at /home/admin/.local/lib/python3.9/site-packages/quanestimation/Common/sys_image
julia_project - INFO - Found existing Python-project specific Julia depot
julia_project - INFO - importing JuliaCall
julia_project.juliacall - INFO - importing julia_project/juliacall
julia_project.basic - INFO - need_resolve: No need to resolve or instantiate found.
julia_project.basic - INFO - Want packages in project: ['PythonCall']
julia_project.basic - INFO - Need to add packages not in project: []
julia_project.basic - INFO - ensure_project_ready:  project /opt/anaconda3/julia_project/quanestimation-1.9.1, depot /opt/anaconda3/julia_project/quanestimation-1.9.1/depot
julia_project.basic - INFO - Want packages in project: ['PythonCall']
julia_project.basic - INFO - Need to add packages not in project: []
julia_project.basic - INFO - need_resolve: No need to resolve or instantiate found.
julia_project.basic - INFO - Project needs no installation or updating
julia_project - INFO - Using private depot '/opt/anaconda3/julia_project/quanestimation-1.9.1/depot'
julia_project.juliacall - INFO - CONFIG['inited'] is true, but we are not reall initialized.
julia_project.juliacall - INFO - Initializing julia.
julia_project.juliacall - INFO - libjulia_path: /snap/julia/80/lib/libjulia.so.1
julia_project.juliacall - INFO - setting JULIA_PROJECT = /opt/anaconda3/julia_project/quanestimation-1.9.1
julia_project.juliacall - INFO - jl_init with default system image
julia_project.juliacall - INFO - libjulia inited.
julia_project.juliacall - INFO - Activating project
julia_project.juliacall - INFO - Done juliacall init .....
julia_project - INFO - PyCall version: None
julia_project - INFO - PythonCall version: 0.9.13
julia_project - INFO - 
julia_project - INFO - JuliaProject.init()
julia_project - INFO - QuanEstimation_INSTALL_JULIA not set
julia_project - INFO - QuanEstimation_COMPILE not set
julia_project - INFO - QuanEstimation_DEPOT not set
julia_project - INFO - julia path: /snap/bin/julia
julia_project - INFO - Julia version: 1.9.1.
julia_project - INFO - os.environ["JULIA_PROJECT"] = /opt/anaconda3/julia_project/quanestimation-1.9.1
julia_project - INFO - System image dir source not found at /home/admin/.local/lib/python3.9/site-packages/quanestimation/Common/sys_image
julia_project - INFO - Found existing Python-project specific Julia depot
julia_project - INFO - importing PyJulia
julia_project.basic - INFO - need_resolve: No need to resolve or instantiate found.
julia_project.basic - INFO - Want packages in project: ['PyCall']
julia_project.basic - INFO - Need to add packages not in project: []
julia_project.basic - INFO - Trial 1: ensure_project_ready
julia_project.basic - INFO - ensure_project_ready:  project /opt/anaconda3/julia_project/quanestimation-1.9.1, depot /opt/anaconda3/julia_project/quanestimation-1.9.1/depot
julia_project.basic - INFO - Want packages in project: ['PyCall']
julia_project.basic - INFO - Need to add packages not in project: []
julia_project.basic - INFO - need_resolve: No need to resolve or instantiate found.
julia_project.basic - INFO - Project needs no installation or updating
julia_project.basic - INFO - import Pkg; Pkg.activate("/opt/anaconda3/julia_project/quanestimation-1.9.1"); include_string(Main, """
function  get_pycall_libpython()
    pycall_jl = Base.find_package("PyCall")
    if isnothing(pycall_jl)
        return (nothing, nothing, "not installed")
    end
    deps_jl = joinpath(dirname(dirname(pycall_jl)), "deps", "deps.jl")
    if ! isfile(deps_jl)
        return (nothing, nothing, "not built")
    end
    include(deps_jl) # not a great way to do this
    return (libpython, python, "ok")
end
"""); res = get_pycall_libpython(); print(res[1],",",res[2],",",res[3])
julia_project - INFO - Using private depot '/opt/anaconda3/julia_project/quanestimation-1.9.1/depot'
julia_project.pyjulia - INFO - Loaded JuliaInfo.
julia_project.pyjulia - INFO - is_pycall_built = True
julia_project.pyjulia - INFO - is_compatible_python = True
julia_project.pyjulia - INFO - Loaded LibJulia.
julia_project.pyjulia - INFO - No custom system image found: /opt/anaconda3/julia_project/quanestimation-1.9.1/sys_image/sys_quanestimation-1.9.1.so.
julia_project.pyjulia - INFO - Initializing julia
julia_project.pyjulia - INFO - api.init_julia() done
julia_project.pyjulia - INFO - PyCall, Base, and Main imported
julia_project - INFO - PyCall version: 1.96.1
julia_project - INFO - PythonCall version: None
julia_project - INFO - 
julia_project - INFO - JuliaProject.init()
julia_project - INFO - QuanEstimation_INSTALL_JULIA not set
julia_project - INFO - QuanEstimation_COMPILE not set
julia_project - INFO - QuanEstimation_DEPOT not set
julia_project - INFO - julia path: /snap/bin/julia
julia_project - INFO - Julia version: 1.9.1.
julia_project - INFO - os.environ["JULIA_PROJECT"] = /opt/anaconda3/julia_project/quanestimation-1.9.1
julia_project - INFO - System image dir source not found at /home/admin/.local/lib/python3.9/site-packages/quanestimation/Common/sys_image
julia_project - INFO - Found existing Python-project specific Julia depot
julia_project - INFO - importing JuliaCall
julia_project.juliacall - INFO - importing julia_project/juliacall
julia_project.basic - INFO - need_resolve: No need to resolve or instantiate found.
julia_project.basic - INFO - Want packages in project: ['PythonCall']
julia_project.basic - INFO - Need to add packages not in project: []
julia_project.basic - INFO - ensure_project_ready:  project /opt/anaconda3/julia_project/quanestimation-1.9.1, depot /opt/anaconda3/julia_project/quanestimation-1.9.1/depot
julia_project.basic - INFO - Want packages in project: ['PythonCall']
julia_project.basic - INFO - Need to add packages not in project: []
julia_project.basic - INFO - need_resolve: No need to resolve or instantiate found.
julia_project.basic - INFO - Project needs no installation or updating
julia_project - INFO - Using private depot '/opt/anaconda3/julia_project/quanestimation-1.9.1/depot'
julia_project.juliacall - INFO - CONFIG['inited'] is true, but we are not reall initialized.
julia_project.juliacall - INFO - Initializing julia.
julia_project.juliacall - INFO - libjulia_path: /snap/julia/80/lib/libjulia.so.1
julia_project.juliacall - INFO - setting JULIA_PROJECT = /opt/anaconda3/julia_project/quanestimation-1.9.1
julia_project.juliacall - INFO - jl_init with default system image
julia_project.juliacall - INFO - libjulia inited.
julia_project.juliacall - INFO - Activating project
julia_project.juliacall - INFO - Done juliacall init .....
julia_project - INFO - PyCall version: None
julia_project - INFO - PythonCall version: 0.9.13
julia_project - INFO - 
julia_project - INFO - JuliaProject.init()
julia_project - INFO - QuanEstimation_INSTALL_JULIA not set
julia_project - INFO - QuanEstimation_COMPILE not set
julia_project - INFO - QuanEstimation_DEPOT not set
julia_project - INFO - julia path: /snap/bin/julia
julia_project - INFO - Julia version: 1.9.2.
julia_project - INFO - os.environ["JULIA_PROJECT"] = /opt/anaconda3/julia_project/quanestimation-1.9.2
julia_project - INFO - System image dir source not found at /home/admin/.local/lib/python3.9/site-packages/quanestimation/Common/sys_image
julia_project - INFO - importing JuliaCall
julia_project.juliacall - INFO - importing julia_project/juliacall
julia_project.basic - INFO - need_resolve: No Manifest.toml
julia_project.basic - INFO - Want packages in project: ['PythonCall']
julia_project.basic - INFO - Need to add packages not in project: ['PythonCall']
julia_project - INFO - Question 'compile', answered True
julia_project.basic - INFO - ensure_project_ready:  project /opt/anaconda3/julia_project/quanestimation-1.9.2, depot None
julia_project.basic - INFO - Want packages in project: ['PythonCall']
julia_project.basic - INFO - Need to add packages not in project: ['PythonCall']
julia_project.basic - INFO - need_resolve: No Manifest.toml
julia_project.basic - INFO - Installing or instantiating project: project /opt/anaconda3/julia_project/quanestimation-1.9.2, depot None
julia_project.basic - INFO - Instantiating project...
julia_project.basic - INFO - import Pkg; Pkg.activate("/opt/anaconda3/julia_project/quanestimation-1.9.2"); Pkg.add("PythonCall");; Pkg.instantiate()
julia_project - INFO - Using default depot.
julia_project.juliacall - INFO - CONFIG['inited'] is true, but we are not reall initialized.
julia_project.juliacall - INFO - Initializing julia.
julia_project.juliacall - INFO - libjulia_path: /snap/julia/83/lib/libjulia.so.1
julia_project.juliacall - INFO - setting JULIA_PROJECT = /opt/anaconda3/julia_project/quanestimation-1.9.2
julia_project.juliacall - INFO - jl_init with default system image
julia_project.juliacall - INFO - libjulia inited.
julia_project.juliacall - INFO - Activating project
julia_project.juliacall - INFO - Done juliacall init .....
julia_project - INFO - PyCall version: None
julia_project - INFO - PythonCall version: 0.9.13
julia_project - INFO - 
julia_project - INFO - JuliaProject.init()
julia_project - INFO - QuanEstimation_INSTALL_JULIA not set
julia_project - INFO - QuanEstimation_COMPILE not set
julia_project - INFO - QuanEstimation_DEPOT not set
julia_project - INFO - julia path: /snap/bin/julia
julia_project - INFO - Julia version: 1.9.2.
julia_project - INFO - os.environ["JULIA_PROJECT"] = /opt/anaconda3/julia_project/quanestimation-1.9.2
julia_project - INFO - System image dir source not found at /home/admin/.local/lib/python3.9/site-packages/quanestimation/Common/sys_image
julia_project - INFO - importing JuliaCall
julia_project.juliacall - INFO - importing julia_project/juliacall
julia_project.basic - INFO - need_resolve: No need to resolve or instantiate found.
julia_project.basic - INFO - Want packages in project: ['PythonCall']
julia_project.basic - INFO - Need to add packages not in project: []
julia_project.basic - INFO - ensure_project_ready:  project /opt/anaconda3/julia_project/quanestimation-1.9.2, depot None
julia_project.basic - INFO - Want packages in project: ['PythonCall']
julia_project.basic - INFO - Need to add packages not in project: []
julia_project.basic - INFO - need_resolve: No need to resolve or instantiate found.
julia_project.basic - INFO - Project needs no installation or updating
julia_project - INFO - Using default depot.
julia_project.juliacall - INFO - CONFIG['inited'] is true, but we are not reall initialized.
julia_project.juliacall - INFO - Initializing julia.
julia_project.juliacall - INFO - libjulia_path: /snap/julia/83/lib/libjulia.so.1
julia_project.juliacall - INFO - setting JULIA_PROJECT = /opt/anaconda3/julia_project/quanestimation-1.9.2
julia_project.juliacall - INFO - jl_init with default system image
julia_project.juliacall - INFO - libjulia inited.
julia_project.juliacall - INFO - Activating project
julia_project.juliacall - INFO - Done juliacall init .....
julia_project - INFO - PyCall version: None
julia_project - INFO - PythonCall version: 0.9.13
julia_project - INFO - 
julia_project - INFO - JuliaProject.init()
julia_project - INFO - QuanEstimation_INSTALL_JULIA not set
julia_project - INFO - QuanEstimation_COMPILE not set
julia_project - INFO - QuanEstimation_DEPOT not set
julia_project - INFO - julia path: /snap/bin/julia
julia_project - INFO - Julia version: 1.9.2.
julia_project - INFO - os.environ["JULIA_PROJECT"] = /opt/anaconda3/julia_project/quanestimation-1.9.2
julia_project - INFO - System image dir source not found at /home/admin/.local/lib/python3.9/site-packages/quanestimation/Common/sys_image
julia_project - INFO - importing PyJulia
julia_project.basic - INFO - need_resolve: No need to resolve or instantiate found.
julia_project.basic - INFO - Want packages in project: ['PyCall']
julia_project.basic - INFO - Need to add packages not in project: ['PyCall']
julia_project - INFO - Question 'compile', answered True
julia_project - INFO - Question 'depot', answered True
julia_project.basic - INFO - Trial 1: ensure_project_ready
julia_project.basic - INFO - ensure_project_ready:  project /opt/anaconda3/julia_project/quanestimation-1.9.2, depot /opt/anaconda3/julia_project/quanestimation-1.9.2/depot
julia_project.basic - INFO - Want packages in project: ['PyCall']
julia_project.basic - INFO - Need to add packages not in project: ['PyCall']
julia_project.basic - INFO - need_resolve: No need to resolve or instantiate found.
julia_project.basic - INFO - Installing or instantiating project: project /opt/anaconda3/julia_project/quanestimation-1.9.2, depot /opt/anaconda3/julia_project/quanestimation-1.9.2/depot
julia_project.basic - INFO - Running pre_install_callback.
julia_project.basic - INFO - Installing general registry
julia_project.basic - INFO - import Pkg; Pkg.activate("/opt/anaconda3/julia_project/quanestimation-1.9.2"); Pkg.Registry.add("General")
julia_project.basic - INFO - Instantiating project...
julia_project.basic - INFO - import Pkg; Pkg.activate("/opt/anaconda3/julia_project/quanestimation-1.9.2"); Pkg.add("PyCall");; Pkg.instantiate()
julia_project.basic - INFO - import Pkg; Pkg.activate("/opt/anaconda3/julia_project/quanestimation-1.9.2"); include_string(Main, """
function  get_pycall_libpython()
    pycall_jl = Base.find_package("PyCall")
    if isnothing(pycall_jl)
        return (nothing, nothing, "not installed")
    end
    deps_jl = joinpath(dirname(dirname(pycall_jl)), "deps", "deps.jl")
    if ! isfile(deps_jl)
        return (nothing, nothing, "not built")
    end
    include(deps_jl) # not a great way to do this
    return (libpython, python, "ok")
end
"""); res = get_pycall_libpython(); print(res[1],",",res[2],",",res[3])
julia_project - INFO - Using private depot '/opt/anaconda3/julia_project/quanestimation-1.9.2/depot'
julia_project.pyjulia - INFO - Loaded JuliaInfo.
julia_project.pyjulia - INFO - is_pycall_built = True
julia_project.pyjulia - INFO - is_compatible_python = True
julia_project.pyjulia - INFO - Loaded LibJulia.
julia_project.pyjulia - INFO - No custom system image found: /opt/anaconda3/julia_project/quanestimation-1.9.2/sys_image/sys_quanestimation-1.9.2.so.
julia_project.pyjulia - INFO - Initializing julia
julia_project.pyjulia - INFO - api.init_julia() done
julia_project.pyjulia - INFO - PyCall, Base, and Main imported
julia_project - INFO - PyCall version: 1.96.1
julia_project - INFO - PythonCall version: None
kunalsinha927 commented 1 year ago

Hey I am facing the same issue on MacOS M1. Will It be possible for you to create a docker image that runs on ARM64. I am willing to work with you on on this if required. @hmyuuu

hmyuuu commented 1 year ago

Finally got time to work on this. Sry for the late response. I successfully built the docker image and imported the package on my MacOS M1 via the following dockerfile:

FROM python
RUN apt-get update \
    && DEBIAN_FRONTEND=noninteractive \
    apt-get install --no-install-recommends --assume-yes \
      cmake \
      build-essential 
RUN pip install quanestimation
CMD python -c 'from quanestimation import *' 

where I chose NOT to compile a system image after installation. (by inputting n.)

It seems that your issues are related to Julia's system image building though, I'll open a new issue later and try to fix this. @Papageno2 @kunalsinha927