ipython / ipython/ipykernel

ipykernel installs invalid kernel.json

Open
#332 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
734
Forks
412
Avg merge
1d 5h
Merged PRs (30d)
8

Description

In #223 the setup.py learned to generate kernel.json, using `write_kernel_spec(overrides={'argv': make_ipkernel_cmd(executable='python')})`

This is completely invalid, as the default is to use sys.executable and hardcoding "python" when installing via:

- `python2 setup.py install` creates a kernel.json that refers to python3 on at least Arch Linux, where python is a symlink to python3
- `python3 setup.py install` creates a kernel.json that refers to python2 on on other operating systems/distributions where python is a symlink to python2

If it is very important to strip out the absolute leading path for sys.executable, then a better way to do that would be, in fact, to strip out the leading path using `os.path.split(sys.executable)[1]`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.