diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 6124dc43..890bf831 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -12,9 +12,8 @@ steps: command: - "echo $$JULIA_DEPOT_PATH" - "julia --project -e 'using Pkg; Pkg.instantiate(;verbose=true)'" - - "julia --project -e 'using Conda; Conda.add(\"scipy=1.8.1\", channel=\"conda-forge\")'" - - "julia --project -e 'using Conda; Conda.add(\"scikit-learn=1.1.1\")'" - - "julia --project -e 'using Conda; Conda.add(\"matplotlib=3.7.1\")'" + - "julia --project -e 'using Conda; Conda.add(\"scipy=1.14.1\", channel=\"conda-forge\")'" + - "julia --project -e 'using Conda; Conda.add(\"scikit-learn=1.5.1\")'" env: PYTHON: "" diff --git a/.github/workflows/Docs.yml b/.github/workflows/Docs.yml index 6239a0de..76d2e62f 100644 --- a/.github/workflows/Docs.yml +++ b/.github/workflows/Docs.yml @@ -36,8 +36,8 @@ jobs: PYTHON: "" run: | julia --color=yes --project -e 'using Pkg; Pkg.instantiate()' - julia --project -e 'using Conda; Conda.add("scipy=1.8.1")' - julia --color=yes --project -e 'using Conda; Conda.add("scikit-learn=1.1.1")' + julia --project -e 'using Conda; Conda.add("scipy=1.14.1")' + julia --color=yes --project -e 'using Conda; Conda.add("scikit-learn=1.5.1")' julia --color=yes --project=docs/ -e 'using Pkg; Pkg.instantiate()' julia --color=yes --project=docs/ -e 'using Pkg; Pkg.precompile()' - name: Build and deploy diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index 53e2c3c9..846a3fd4 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -39,8 +39,8 @@ jobs: env: PYTHON: "" run: | - julia --project -e 'using Conda; Conda.add("scipy=1.8.1")' - julia --project -e 'using Conda; Conda.add("scikit-learn=1.1.1")' + julia --project -e 'using Conda; Conda.add("scipy=1.14.1")' + julia --project -e 'using Conda; Conda.add("scikit-learn=1.5.1")' - name: Run Unit Tests env: @@ -92,8 +92,8 @@ jobs: env: PYTHON: "" run: | - julia --project -e 'using Conda; Conda.add("scipy=1.8.1")' - julia --project -e 'using Conda; Conda.add("scikit-learn=1.1.1")' + julia --project -e 'using Conda; Conda.add("scipy=1.14.1")' + julia --project -e 'using Conda; Conda.add("scikit-learn=1.5.1")' - name: Run Unit Tests env: @@ -132,8 +132,8 @@ jobs: env: PYTHON: "" run: | - julia --project -e 'using Conda; Conda.add("scipy=1.8.1")' - julia --project -e 'using Conda; Conda.add(\"scikit-learn=1.1.1\")' + julia --project -e 'using Conda; Conda.add("scipy=1.14.1")' + julia --project -e 'using Conda; Conda.add("scikit-learn=1.5.1")' - name: Run Unit Tests env: diff --git a/docs/src/installation_instructions.md b/docs/src/installation_instructions.md index 654aa5e3..992d1363 100644 --- a/docs/src/installation_instructions.md +++ b/docs/src/installation_instructions.md @@ -3,8 +3,12 @@ ### Installing CalibrateEmulateSample.jl Currently CalibrateEmulateSample (CES) depends on some external python dependencies -including `scipy` (version `1.8.1` works) and `scikit-learn` (version `1.1.1` works) that are wrapped by ScikitLearn.jl. - +!!! info "Latest python package versions!" + We have verified that the configurations work: + For Python `3.11 - 3.12`: `scipy` = `1.14.1`, `scikit-learn` = `1.5.1`. + For Python `3.8 - 3.11`: `scipy` = `1.8.1`, `scikit-learn` = `1.1.1`. + Please create an issue if you have had success with more up-to-date versions, and we can update this page! + If you have dependencies installed already, then the code can be used by simply entering ``` @@ -32,10 +36,24 @@ Then install the dependencies by having the project use its own [Conda](https:// This call should build Conda and Pycall. The `scikit-learn` package (along with `scipy`) then has to be installed if using a Julia project-specific Conda environment: ``` -> PYTHON="" julia --project -e 'using Conda; Conda.add("scipy=1.8.1", channel="conda-forge")' -> PYTHON="" julia --project -e 'using Conda; Conda.add("scikit-learn=1.1.1")' +> PYTHON="" julia --project -e 'using Conda; Conda.add("scipy=1.14.1", channel="conda-forge")' +> PYTHON="" julia --project -e 'using Conda; Conda.add("scikit-learn=1.5.1")' ``` +!!! info "Pycall can't find the packages!?" + Sometimes `Conda.jl` builds the python packages, in julia-based python repo but Pycall resorts to a different python path. this throws an error like: + ``` + ERROR: InitError: PyError (PyImport_ImportModule + + The Python package sklearn.gaussian_process.kernels could not be imported by pyimport. + ``` + In this case, simply call `julia --project` followed by + ```julia + julia> ENV["PYTHON"]="" + julia> Pkg.build("PyCall") + julia> exit() + ``` + to reset unify the paths. See the [PyCall.jl documentation](https://github.com/JuliaPy/PyCall.jl#specifying-the-python-version) for more information about how to configure the local Julia / Conda / Python environment.