Comments (8)
I understand now. Julia > 1.10 breaks our package, which is why I wanted juliacall
to use my installation. Anyway, we figured we can pin the Julia version in our package, so it's all good. But, if this is some option you want to provide later, feel free to keep this issue open.
from pythoncall.jl.
It is supposed to use any system installed Julia if it is compatible. If not it will print a warning and download a newer version.
from pythoncall.jl.
That's what I thought too. But I tried several times with 1.10 installed system wide, and yet it installed 1.10.1
from pythoncall.jl.
What is shutil.which("julia")
?
And please post the full log messages you get after import juliacall
.
from pythoncall.jl.
shutil.which("julia")
❯ python
Python 3.10.13 | packaged by conda-forge | (main, Dec 23 2023, 15:36:39) [GCC 12.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import shutil
>>> shutil.which("julia")
'/home/amin/.juliaup/bin/julia'
Traceback for import juliacall
on a fresh conda virtualenv
~ via 🅒 test
❯ pip install juliacall
Collecting juliacall
Using cached juliacall-0.9.15-py3-none-any.whl.metadata (4.7 kB)
Collecting juliapkg~=0.1.8 (from juliacall)
Downloading juliapkg-0.1.10-py3-none-any.whl.metadata (6.0 kB)
Collecting semantic-version~=2.9 (from juliapkg~=0.1.8->juliacall)
Using cached semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)
Using cached juliacall-0.9.15-py3-none-any.whl (11 kB)
Using cached juliapkg-0.1.10-py3-none-any.whl (15 kB)
Installing collected packages: semantic-version, juliapkg, juliacall
Successfully installed juliacall-0.9.15 juliapkg-0.1.10 semantic-version-2.10.0
~ via 🅒 test took 2s
❯ python
Python 3.10.13 | packaged by conda-forge | (main, Dec 23 2023, 15:36:39) [GCC 12.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import juliacall
[juliapkg] Locating Julia ^1.6.1
[juliapkg] Using Julia 1.10.1 at /home/amin/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/bin/julia
[juliapkg] Using Julia project at /home/amin/mambaforge/envs/test/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 `~/mambaforge/envs/test/julia_env/Project.toml`
[6099a3de] + PythonCall v0.9.15
Updating `~/mambaforge/envs/test/julia_env/Manifest.toml`
[992eb4ea] + CondaPkg v0.2.22
[9a962f9c] + DataAPI v1.16.0
[e2d170a0] + DataValueInterfaces v1.0.0
[82899510] + IteratorInterfaceExtensions v1.0.0
[692b3bcd] + JLLWrappers v1.5.0
[0f8b85d8] + JSON3 v1.14.0
[1914dd2f] + MacroTools v0.5.13
[0b3b1443] + MicroMamba v0.1.14
[bac558e1] + OrderedCollections v1.6.3
[69de0a69] + Parsers v2.8.1
[fa939f87] + Pidfile v1.3.0
[aea7be01] + PrecompileTools v1.2.0
[21216c6a] + Preferences v1.4.1
[6099a3de] + PythonCall v0.9.15
[ae029012] + Requires v1.3.0
[6c6a2e73] + Scratch v1.2.1
[856f2bd8] + StructTypes v1.10.0
[3783bdb8] + TableTraits v1.0.1
[bd369af6] + Tables v1.11.1
[e17b2a0c] + UnsafePointers v1.0.0
[f8abcde7] + micromamba_jll v1.4.9+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.4
[76f85450] + LibGit2
[8f399da3] + Libdl
[37e2e46d] + LinearAlgebra
[56ddb016] + Logging
[d6f4376e] + Markdown
[a63ad114] + Mmap
[ca575930] + NetworkOptions v1.2.0
[44cfe95a] + Pkg v1.10.0
[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.1.0+0
[deac9b47] + LibCURL_jll v8.4.0+0
[e37daf67] + LibGit2_jll v1.6.4+0
[29816b5a] + LibSSH2_jll v1.11.0+1
[c8ffd9c3] + MbedTLS_jll v2.28.2+1
[14a3606d] + MozillaCACerts_jll v2023.1.10
[4536629a] + OpenBLAS_jll v0.3.23+4
[83775a58] + Zlib_jll v1.2.13+1
[8e850b90] + libblastrampoline_jll v5.8.0+1
[8e850ede] + nghttp2_jll v1.52.0+1
[3f19e933] + p7zip_jll v17.4.0+2
No Changes to `~/mambaforge/envs/test/julia_env/Project.toml`
No Changes to `~/mambaforge/envs/test/julia_env/Manifest.toml`
Segmentation fault (core dumped)
from pythoncall.jl.
Ah this is intended behaviour. What's happening here
>>> import juliacall
[juliapkg] Locating Julia ^1.6.1
[juliapkg] Using Julia 1.10.1 at /home/amin/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/bin/julia
is that juliapkg found that you already have Julia 1.10.1 installed by juliaup, so it's using that. It isn't installing julia, contrary to the title of the issue.
from pythoncall.jl.
Sorry, here's the correct log:
(test) zaboor@zaboor:~$ juliaup status
Default Channel Version Update
--------------------------------------------------
* 1.10.0 1.10.0+0.x64.linux.gnu
(test) zaboor@zaboor:~$ python
Python 3.10.13 | packaged by conda-forge | (main, Dec 23 2023, 15:36:39) [GCC 12.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import juliacall
[juliapkg] Locating Julia ^1.6.1
[juliapkg] Installing Julia 1.10.2 using JuliaUp
As you can see, Julia 1.10.0 is installed, yet juliacall
tries to install 1.10.2. This is on a fresh virtualenv.
from pythoncall.jl.
If you're in a fresh env or change any packages, juliapkg will re-resolve the dependencies, which includes the version of Julia itself. If you have JuliaUp it will use that to install the latest compatible version of Julia; if not but you do have Julia it will use that. This should only happen once until you modify your environment.
There isn't an option (yet) to prefer already-installed versions, but you can use the juliapkg-exe or juliapkg-offline settings to force using a pre-installed Julia: https://github.com/JuliaPy/pyjuliapkg?tab=readme-ov-file#configuration
from pythoncall.jl.
Related Issues (20)
- Not working with julia version 1.10.1 on linux systems HOT 15
- Typing stubs
- viewing Julia docstrings from Python HOT 6
- 172407 segmentation fault (core dumped) python HOT 2
- Segmentation fault on `import juliacall` in a CI job HOT 4
- Python callback to a Julia function? HOT 11
- How to use package if conda-forge must be accessed through a proxy channel? HOT 4
- `pyjlcallback` not defined? HOT 2
- Convert Python functions and lambdas to a Julia PyFunction <: Function
- `@pyexec` broken: `ERROR: LoadError: UndefVarError: `MacroTools` not defined` HOT 1
- error in running finalizer: UndefVarError(var=:_Py) HOT 1
- Incorrect Julia version for Apple silicon HOT 1
- juliacall: Can not use `@show` and `println` in the callback function of ros.py
- Managing optional dependencies in Python projects HOT 1
- numpy functions don't treat Any[...] arrays like Python lists HOT 2
- `display` broken for parametric structs with `show` referencing the struct parameters HOT 1
- use existing julia install HOT 1
- AttributeError: 'NoneType' object has no attribute 'f_locals' HOT 1
- Python: TypeError: Object of type DictValue is not JSON serializable HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pythoncall.jl.