Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Python 2.7 support #118

Closed
parente opened this issue Nov 9, 2015 · 6 comments
Closed

Python 2.7 support #118

parente opened this issue Nov 9, 2015 · 6 comments
Milestone

Comments

@parente
Copy link
Member

parente commented Nov 9, 2015

Make the extension work when the notebook server is running under Python 2.7. Will need to run the backend test suite against both on Travis. Can do this either with the python2.7 install in our dev container or outside the container like https://github.com/jupyter-incubator/kernel_gateway does.

Off the top of my head:

  • Look at problems with package import changes
  • Look at setup.py to see if there's anything 3.x specific about the package
  • Add PYTHON param to dev, install, test etc. target in the makefile to allow install against Python 2 or 3 in the container.

See jupyter/declarativewidgets#50 for the counterpart issue.

@Lull3rSkat3r
Copy link
Member

PR #122 will close this issue.

@parente parente modified the milestone: 0.1.0 Nov 11, 2015
@parente
Copy link
Member Author

parente commented Nov 11, 2015

Merged PR. Thanks!

@parente parente closed this as completed Nov 11, 2015
@parente parente reopened this Nov 11, 2015
@parente
Copy link
Member Author

parente commented Nov 11, 2015

Kernels don't start because of sh -> bash change. But with sh, python2 env activation doesn't work and we end up running with Python 3.

@Lull3rSkat3r
Copy link
Member

source is a bash specific command. The equivalent in plain sh is to use .. However, when you run . activate python2 in sh you will see some errors and a message saying activate only supports bash or zsh (this is referenced here as well).

@Lull3rSkat3r
Copy link
Member

Found a solution. The shell process which is run in the docker container will always be bash. The source activate python2 will then be run in bash (if running python2, nothing will be run for python3). From here, sh is run to start the ipython process. The sh process will inherit the vars from the previous shell, which has the correct PATH for the various versions of python.

In my original change, the dev-with-widgets target should work on both python3 and python2 for this reason.

@Lull3rSkat3r
Copy link
Member

Fix is in PR #128

@parente parente closed this as completed Nov 11, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants