JuliaPy / JuliaPy/PyCall.jl

Wrong python path when updating PyCall on NixOS

Open
#771 0 comments 3 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
1.5k
Forks
186
PR merge metrics
No merged PRs in 30d

Description

When trying to update PyCall on NixOS the build script does not pick up the correct python binary for my nix environment and fails while building with this error:

>Error: Error building `PyCall`:
│ PREFIX=/home/christoph/.julia/conda/3
│ Unpacking payload ...
│ /home/christoph/.julia/conda/3/installer.sh: line 404: /home/christoph/.julia/conda/3/conda.exe: No such file or directory
│ /home/christoph/.julia/conda/3/installer.sh: line 406: /home/christoph/.julia/conda/3/conda.exe: No such file or directory
│ ┌ Info: No system-wide Python was found; got the following error:
│ │ Base.IOError("could not spawn setenv(`/nix/store/1ysl29qhalc442cnjxpsbg4apmzl77w9-python3-3.7.5-env/bin/python3.7
...

when the newer and correct Python binary for this particular nix environment is:
>/nix/store/bgqm5mslbcn42cx52qm45275gvsw85gv-python3-3.7.6-env/bin/python

Nuking `~/.julia/` and trying to install PyCall from scratch works though. My best guess is that PyCall somewhere stores the path to the Python binary it finds when installed for the first time and tries to keep using that even though nix has moved python to a different directory.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.