JuliaInterop / JuliaCall

Embed Julia in R
https://non-contradiction.github.io/JuliaCall/index.html
Other
267 stars 36 forks source link

Package not found in path #189

Open arnold-c opened 2 years ago

arnold-c commented 2 years ago

I'm trying to include {JuliaCall} within my workflow and am running into an issue where my Julia packages are not discovered. I've tried adding both /usr/local/bin/julia(result of which Julia) and /Applications/Julia-1.8.app/Contents/Resources/Julia/bin to my .zshrc files (export PATH="$PATH:/...") and restarting the R session, but to no avail.

Could it be because I am using {renv}, or am I missing something else?

r$> library(JuliaCall)

r$> julia_setup()
Julia version 1.8.2 at location /Applications/Julia-1.8.app/Contents/Resources/julia/bin will be used.
Loading setup script for JuliaCall...
Finish loading setup script for JuliaCall.

r$> julia_library("Gadfly")
Error: Error happens in Julia.
ArgumentError: Package Gadfly not found in current path.
- Run `import Pkg; Pkg.add("Gadfly")` to install the Gadfly package.
Stacktrace:
 [1] macro expansion
   @ ./loading.jl:1163 [inlined]
 [2] macro expansion
   @ ./lock.jl:223 [inlined]
 [3] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1144
 [4] eval
   @ ./boot.jl:368 [inlined]
 [5] eval_string(x::String)
   @ Main.JuliaCall ~/Documents/Repos/Data4Action/renv/library/R-4.2/aarch64-apple-darwin20/JuliaCall/julia/setup.jl:203
 [6] docall(call1::Ptr{Nothing})
   @ Main.JuliaCall ~/Documents/Repos/Data4Action/renv/library/R-4.2/aarch64-apple-darwin20/JuliaCall/julia/setup.jl:0
Session Info ```r r$> sessionInfo() R version 4.2.1 (2022-06-23) Platform: aarch64-apple-darwin20 (64-bit) Running under: macOS Ventura 13.0 Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libRlapack.dylib locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices datasets utils methods base other attached packages: [1] JuliaCall_0.17.5 loaded via a namespace (and not attached): [1] compiler_4.2.1 fastmap_1.1.0 cli_3.4.1 tools_4.2.1 Rcpp_1.0.9 memoise_2.0.1 crayon_1.5.2 [8] paint_0.1.5 cachem_1.0.6 knitr_1.40 conflicted_1.1.0 xfun_0.33 jsonlite_1.8.2 rlang_1.0.6 [15] renv_0.16.0 ```
`] st -m` ``` Status `~/.julia/environments/v1.8/Manifest.toml` [49dc2e85] Calculus v0.5.1 [324d7699] CategoricalArrays v0.10.7 [d360d2e6] ChainRulesCore v1.15.6 [9e997f8a] ChangesOfVariables v0.1.4 ⌃ [da1fd8a2] CodeTracking v1.1.0 [34da2185] Compat v4.3.0 [8f4d0f93] Conda v1.7.0 [a8cc5b0e] Crayons v4.1.1 [9a962f9c] DataAPI v1.12.0 [a93c6f00] DataFrames v1.4.1 [864edb3b] DataStructures v0.18.13 [e2d170a0] DataValueInterfaces v1.0.0 [ffbed154] DocStringExtensions v0.9.2 [fa6b7ba4] DualNumbers v0.6.8 [59287772] Formatting v0.4.2 [34004b35] HypergeometricFunctions v0.3.11 [3587e190] InverseFunctions v0.1.8 [41ab1584] InvertedIndices v1.1.0 [92d709cd] IrrationalConstants v0.1.1 [82899510] IteratorInterfaceExtensions v1.0.0 [692b3bcd] JLLWrappers v1.4.1 [682c06a0] JSON v0.21.3 [aa1ae85d] JuliaInterpreter v0.9.15 [2ab3a3ac] LogExpFunctions v0.3.18 [6f1432cf] LoweredCodeUtils v2.2.2 [e1d29d7a] Missings v1.0.2 [77ba4419] NaNMath v1.0.1 [bac558e1] OrderedCollections v1.4.1 [69de0a69] Parsers v2.4.2 [2dfb63ee] PooledArrays v1.4.2 [21216c6a] Preferences v1.3.0 [08abe8d2] PrettyTables v2.1.2 [6f49c342] RCall v0.13.14 [189a3867] Reexport v1.2.2 [ae029012] Requires v1.3.0 [295af30f] Revise v3.4.0 [79098fc4] Rmath v0.7.0 [1277b4bf] ShiftedArrays v2.0.0 [66db9d55] SnoopPrecompile v1.0.1 [a2af1166] SortingAlgorithms v1.0.1 [276daf66] SpecialFunctions v2.1.7 [82ae8749] StatsAPI v1.5.0 [2913bbd2] StatsBase v0.33.21 [4c63d2b9] StatsFuns v1.0.1 [3eaba693] StatsModels v0.6.33 [892a3eda] StringManipulation v0.3.0 [fd094767] Suppressor v0.2.1 [3783bdb8] TableTraits v1.0.1 [bd369af6] Tables v1.10.0 [81def892] VersionParsing v1.3.0 [1b915085] WinReg v0.3.1 [efe28fd5] OpenSpecFun_jll v0.5.5+0 [f50d1b31] Rmath_jll v0.3.0+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 [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.8.0 [de0858da] Printf [3fa0cd96] REPL [9a3f8284] Random [ea8e919c] SHA v0.7.0 [9e88b42a] Serialization [6462fe0b] Sockets [2f01184e] SparseArrays [10745b16] Statistics [fa267f1f] TOML v1.0.0 [a4e569a6] Tar v1.10.1 [8dfed614] Test [cf7118a7] UUIDs [4ec0a83e] Unicode [e66e0078] CompilerSupportLibraries_jll v0.5.2+0 [deac9b47] LibCURL_jll v7.84.0+0 [29816b5a] LibSSH2_jll v1.10.2+0 [c8ffd9c3] MbedTLS_jll v2.28.0+0 [14a3606d] MozillaCACerts_jll v2022.2.1 [4536629a] OpenBLAS_jll v0.3.20+0 [05823500] OpenLibm_jll v0.8.1+0 [83775a58] Zlib_jll v1.2.12+3 [8e850b90] libblastrampoline_jll v5.1.1+0 [8e850ede] nghttp2_jll v1.48.0+0 [3f19e933] p7zip_jll v17.4.0+0 ```
`ls ~/.julia/packages` ``` ❯ ls ~/.julia/packages AbstractAlgebra Graphs PreallocationTools AbstractFFTs GridLayoutBase PrecompileSignatures AbstractPlotting Grisu Preferences AbstractTrees Groebner PrettyTables Adapt GroupsCore Primes AlgebraOfGraphics HTTP ProgressMeter Animations HarfBuzz_jll Qt5Base_jll ArgCheck Hexagons QuadGK ArnoldiMethod Highlights Quadmath Arpack HostCPUFeatures Quarto Arpack_jll HypergeometricFunctions RCall ArrayInterface HypertextLiteral RData ArrayInterfaceCore IJulia RDatasets ArrayInterfaceGPUArrays IfElse Random123 ArrayInterfaceOffsetArrays ImageCore RandomExtensions ArrayInterfaceStaticArrays ImageIO RandomNumbers ArrayInterfaceStaticArraysCore Imath_jll Ratios ArrayLayouts IndexedTables RecipesBase Arrow IndirectArrays RecipesPipeline ArrowTypes Inflate RecursiveArrayTools AssetRegistry IniFile RecursiveFactorization AutoHashEquals InitialValues Reexport AxisAlgorithms InlineStrings Referenceables BandedMatrices IntegerMathUtils RelocatableFolders BangBang IntelOpenMP_jll Requires Baselet Interact ResettableStacks BenchmarkTools InteractBase ReverseDiff Bijections Interpolations Revise BinaryProvider IntervalSets Rmath BitIntegers Intervals Rmath_jll BitTwiddlingConvenienceFunctions InverseFunctions RuntimeGeneratedFunctions BoundaryValueDiffEq InvertedIndices SIMDDualNumbers Bzip2_jll IrrationalConstants SIMDTypes CEnum Isoband SLEEFPirates CPUSummary IterTools SciMLBase CSSUtil IterativeSolvers Scratch CSTParser IteratorInterfaceExtensions SentinelArrays CSV JLLWrappers Setfield Cairo JSExpr ShiftedArrays CairoMakie JSON Showoff Cairo_jll JpegTurbo_jll SignedDistanceFields Calculus JuMP SimpleBufferStream CategoricalArrays JuliaDB SimpleTraits Chain JuliaFormatter SimpleWeightedGraphs ChainRulesCore JuliaInterpreter SnoopPrecompile ChangesOfVariables JumpProcesses SoftGlobalScope CloseOpenIntervals Juno SortingAlgorithms Clustering KLU SparseDiffTools CodeTracking KernelDensity SpecialFunctions CodecBzip2 Knockout SplittablesBase CodecLz4 Krylov StackViews CodecZlib KrylovKit Static CodecZstd LAME_jll StaticArrays ColorBrewer LERC_jll StaticArraysCore ColorSchemes LZO_jll StatsAPI ColorTypes LaTeXStrings StatsBase ColorVectorSpace LabelledArrays StatsFuns Colors LambertW StatsModels Combinatorics Latexify StatsPlots CommonMark LayoutPointers SteadyStateDiffEq CommonSolve LevyArea StochasticDiffEq CommonSubexpressions Libffi_jll StrideArraysCore Compat Libgcrypt_jll StringEncodings Compose Libglvnd_jll StringManipulation CompositeTypes Libgpg_error_jll StructArrays CompositionsBase Libiconv_jll StructTypes Conda Libmount_jll Sundials Configurations Libtiff_jll Sundials_jll ConstructionBase Libuuid_jll Suppressor Contour LightGraphs SymbolicUtils CoupledFields LineSearches Symbolics CovarianceEstimation LinearSolve TableIOInterface CpuId Loess TableOperations Crayons LogExpFunctions TableTraits DEDataArrays LoggingExtras TableTraitsUtils DSP LoopVectorization Tables Dagger LoweredCodeUtils TermInterface DataAPI Lz4_jll TextParse DataFrames MIMEs ThreadingUtilities DataFramesMeta MKL_jll ThreadsX DataStructures MacroTools TiffImages DataValueInterfaces Makie TimeSeries DataValues ManualMemory TimeZones DefineSingletons MappedArrays TimerOutputs DelayDiffEq Match Tokenize DensityInterface MathOptInterface TranscodingStreams DiffEqBase MbedTLS Transducers DiffEqCallbacks Measures TreeViews DiffEqDiffTools Media TriangularSolve DiffEqJump MemPool Tricks DiffEqNoiseProcess Metatheory URIs DiffResults MicroCollections UnPack DiffRules Missings UnicodeFun DifferentialEquations Mocking Unitful Distances ModelingToolkit Unzip Distributions MosaicViews VectorizationBase DocStringExtensions MsgPack VersionParsing DomainSets MuladdMacro VertexSafeGraphs DoubleFloats MultivariatePolynomials Wayland_jll DualNumbers MultivariateStats Wayland_protocols_jll DynamicPolynomials Mustache WeakRefStrings EarCut_jll MutableArithmetics Weave EllipsisNotation NLSolversBase WebIO Expat_jll NLsolve WebSockets ExponentialUtilities NaNMath Widgets ExprTools NamedDims WinReg ExproniconLite NearestNeighbors WoodburyMatrices Extents Netpbm XML2_jll FFMPEG NonlinearSolve XSLT_jll FFMPEG_jll Nullables Xorg_libX11_jll FFTW Observables Xorg_libXau_jll FFTW_jll OffsetArrays Xorg_libXcursor_jll FastBroadcast Ogg_jll Xorg_libXdmcp_jll FastClosures OnlineStats Xorg_libXext_jll FastLapackInterface OnlineStatsBase Xorg_libXfixes_jll FileIO OpenEXR Xorg_libXi_jll FilePathsBase OpenEXR_jll Xorg_libXinerama_jll FillArrays OpenSSL_jll Xorg_libXrandr_jll FiniteDiff OpenSpecFun_jll Xorg_libXrender_jll FixedPointNumbers Optim Xorg_libpthread_stubs_jll Fontconfig_jll Opus_jll Xorg_libxcb_jll Formatting OrderedCollections Xorg_libxkbfile_jll ForwardDiff OrdinaryDiffEq Xorg_xcb_util_image_jll FreeType PCRE_jll Xorg_xcb_util_jll FreeType2_jll PDMats Xorg_xcb_util_keysyms_jll FreeTypeAbstraction PNGFiles Xorg_xcb_util_renderutil_jll FriBidi_jll Packing Xorg_xcb_util_wm_jll FunctionWrappers PaddedViews Xorg_xkbcomp_jll FunctionWrappersWrappers Pango_jll Xorg_xkeyboard_config_jll FunctionalCollections ParameterizedFunctions Xorg_xtrans_jll FuzzyCompletions Parameters YAML GLFW_jll Parsers ZMQ GLM Pidfile ZeroMQ_jll GPUArraysCore Pipe Zstd_jll GR Pixman_jll ZygoteRules GR_jll PkgVersion isoband_jll Gadfly PlotThemes libaom_jll GenericLinearAlgebra PlotUtils libass_jll GenericSchur Plots libfdk_aac_jll GeoInterface Pluto libpng_jll GeometryBasics PoissonRandom libsodium_jll GeometryTypes Polyester libvorbis_jll Gettext_jll PolyesterWeave x264_jll Glib_jll PolygonOps x265_jll Glob Polynomials xkbcommon_jll Graphics PooledArrays Graphite2_jll PositiveFactorizations ```