Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent PYTHONHOME, set by Python_jll, from leaking in the Julia environment. #64

Merged
merged 1 commit into from
Jul 22, 2022

Conversation

maleadt
Copy link
Member

@maleadt maleadt commented Jul 22, 2022

It breaks loading Python from Julia, as done by e.g. Conda.jl.

$ jl --bug-report=rr-local 

julia> run(`python -c "import sys; print(sys.version)"`)
Python path configuration:
  PYTHONHOME = '/home/tim/Julia/depot/artifacts/7feba47da7f679e59da788f7b564290573ea4e07'
  PYTHONPATH = (not set)
  program name = 'python'
  isolated = 0
  environment = 1
  user site = 1
  import site = 1
  sys._base_executable = '/usr/bin/python'
  sys.base_prefix = '/home/tim/Julia/depot/artifacts/7feba47da7f679e59da788f7b564290573ea4e07'
  sys.base_exec_prefix = '/home/tim/Julia/depot/artifacts/7feba47da7f679e59da788f7b564290573ea4e07'
  sys.platlibdir = 'lib'
  sys.executable = '/usr/bin/python'
  sys.prefix = '/home/tim/Julia/depot/artifacts/7feba47da7f679e59da788f7b564290573ea4e07'
  sys.exec_prefix = '/home/tim/Julia/depot/artifacts/7feba47da7f679e59da788f7b564290573ea4e07'
  sys.path = [
    '/home/tim/Julia/depot/artifacts/7feba47da7f679e59da788f7b564290573ea4e07/lib/python310.zip',
    '/home/tim/Julia/depot/artifacts/7feba47da7f679e59da788f7b564290573ea4e07/lib/python3.10',
    '/home/tim/Julia/depot/artifacts/7feba47da7f679e59da788f7b564290573ea4e07/lib/python3.10/lib-dynload',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

@maleadt maleadt marked this pull request as ready for review July 22, 2022 20:52
…ronment.

It breaks loading Python from Julia, as done by e.g. Conda.jl.
@maleadt maleadt merged commit 01dcb76 into master Jul 22, 2022
@maleadt maleadt deleted the tb/python branch July 22, 2022 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant