{"action":"closed","number":27,"pull_request":{"url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/pulls/27","id":185098564,"html_url":"https://github.com/nanshe-org/docker_nanshe_notebook/pull/27","diff_url":"https://github.com/nanshe-org/docker_nanshe_notebook/pull/27.diff","patch_url":"https://github.com/nanshe-org/docker_nanshe_notebook/pull/27.patch","issue_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/issues/27","number":27,"state":"closed","locked":false,"title":"Patch Python 2/3 kernels to use wrapper scripts","user":{"login":"jakirkham","id":3019665,"avatar_url":"https://avatars1.githubusercontent.com/u/3019665?v=4","gravatar_id":"","url":"https://api.github.com/users/jakirkham","html_url":"https://github.com/jakirkham","followers_url":"https://api.github.com/users/jakirkham/followers","following_url":"https://api.github.com/users/jakirkham/following{/other_user}","gists_url":"https://api.github.com/users/jakirkham/gists{/gist_id}","starred_url":"https://api.github.com/users/jakirkham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakirkham/subscriptions","organizations_url":"https://api.github.com/users/jakirkham/orgs","repos_url":"https://api.github.com/users/jakirkham/repos","events_url":"https://api.github.com/users/jakirkham/events{/privacy}","received_events_url":"https://api.github.com/users/jakirkham/received_events","type":"User","site_admin":false},"body":"Currently the Jupyter Notebook will open each Python kernel, but not activate their respective environment. This is a problem if the user tries to run anything as a shell command as it will not run in the correct environment. Thus it will pickup the wrong `pip` or `conda` environment. In the best case, this results in an unusual result like showing the wrong `python` is used. In the worst case, it could result in changing the wrong environment or submitting info from the wrong environment in a bug report.\r\n\r\nTo fix this, we install the `ipykernel` just as before, but we use a hack to replace the `python` path to not point at the `python` in the `conda` environment, but instead at the versioned `python` wrapper script in `/usr/local/bin`. As that wrapper script activates the correct `conda` environment before calling `python` to start the Jupyter Notebook kernel, the user is place in a correctly activated environment. All calls to `conda`, `python`, and `pip` will work as expected and point at the correct executables. Thus along the Jupyter Notebook kernels to seamless interoperate with the `conda` environment expected. Should make debugging and further modification painless for the user.","created_at":"2018-05-01T00:37:13Z","updated_at":"2018-05-01T03:03:39Z","closed_at":"2018-05-01T03:03:39Z","merged_at":"2018-05-01T03:03:39Z","merge_commit_sha":"4eaa66aaa9d8ca196558b94770a1bfaaa4149e63","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/pulls/27/commits","review_comments_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/pulls/27/comments","review_comment_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/issues/27/comments","statuses_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/statuses/5f8613a888e600a788af526146a996286a9aa620","head":{"label":"jakirkham:py_kern_use_active_env","ref":"py_kern_use_active_env","sha":"5f8613a888e600a788af526146a996286a9aa620","user":{"login":"jakirkham","id":3019665,"avatar_url":"https://avatars1.githubusercontent.com/u/3019665?v=4","gravatar_id":"","url":"https://api.github.com/users/jakirkham","html_url":"https://github.com/jakirkham","followers_url":"https://api.github.com/users/jakirkham/followers","following_url":"https://api.github.com/users/jakirkham/following{/other_user}","gists_url":"https://api.github.com/users/jakirkham/gists{/gist_id}","starred_url":"https://api.github.com/users/jakirkham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakirkham/subscriptions","organizations_url":"https://api.github.com/users/jakirkham/orgs","repos_url":"https://api.github.com/users/jakirkham/repos","events_url":"https://api.github.com/users/jakirkham/events{/privacy}","received_events_url":"https://api.github.com/users/jakirkham/received_events","type":"User","site_admin":false},"repo":{"id":69266785,"name":"docker_nanshe_notebook","full_name":"jakirkham/docker_nanshe_notebook","owner":{"login":"jakirkham","id":3019665,"avatar_url":"https://avatars1.githubusercontent.com/u/3019665?v=4","gravatar_id":"","url":"https://api.github.com/users/jakirkham","html_url":"https://github.com/jakirkham","followers_url":"https://api.github.com/users/jakirkham/followers","following_url":"https://api.github.com/users/jakirkham/following{/other_user}","gists_url":"https://api.github.com/users/jakirkham/gists{/gist_id}","starred_url":"https://api.github.com/users/jakirkham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakirkham/subscriptions","organizations_url":"https://api.github.com/users/jakirkham/orgs","repos_url":"https://api.github.com/users/jakirkham/repos","events_url":"https://api.github.com/users/jakirkham/events{/privacy}","received_events_url":"https://api.github.com/users/jakirkham/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jakirkham/docker_nanshe_notebook","description":"A docker container with nanshe and the Jupyter Notebook installed.","fork":true,"url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook","forks_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/forks","keys_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/teams","hooks_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/hooks","issue_events_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/issues/events{/number}","events_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/events","assignees_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/assignees{/user}","branches_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/branches{/branch}","tags_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/tags","blobs_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/git/refs{/sha}","trees_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/statuses/{sha}","languages_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/languages","stargazers_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/stargazers","contributors_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/contributors","subscribers_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/subscribers","subscription_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/subscription","commits_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/commits{/sha}","git_commits_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/git/commits{/sha}","comments_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/comments{/number}","issue_comment_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/issues/comments{/number}","contents_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/contents/{+path}","compare_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/merges","archive_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/downloads","issues_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/issues{/number}","pulls_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/pulls{/number}","milestones_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/milestones{/number}","notifications_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/labels{/name}","releases_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/releases{/id}","deployments_url":"https://api.github.com/repos/jakirkham/docker_nanshe_notebook/deployments","created_at":"2016-09-26T15:56:38Z","updated_at":"2018-05-01T00:11:23Z","pushed_at":"2018-05-01T02:39:35Z","git_url":"git://github.com/jakirkham/docker_nanshe_notebook.git","ssh_url":"git@github.com:jakirkham/docker_nanshe_notebook.git","clone_url":"https://github.com/jakirkham/docker_nanshe_notebook.git","svn_url":"https://github.com/jakirkham/docker_nanshe_notebook","homepage":"","size":32,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"nanshe-org:master","ref":"master","sha":"e9021884d9c678d15e391730e2ccb2acce9fe040","user":{"login":"nanshe-org","id":14901684,"avatar_url":"https://avatars2.githubusercontent.com/u/14901684?v=4","gravatar_id":"","url":"https://api.github.com/users/nanshe-org","html_url":"https://github.com/nanshe-org","followers_url":"https://api.github.com/users/nanshe-org/followers","following_url":"https://api.github.com/users/nanshe-org/following{/other_user}","gists_url":"https://api.github.com/users/nanshe-org/gists{/gist_id}","starred_url":"https://api.github.com/users/nanshe-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nanshe-org/subscriptions","organizations_url":"https://api.github.com/users/nanshe-org/orgs","repos_url":"https://api.github.com/users/nanshe-org/repos","events_url":"https://api.github.com/users/nanshe-org/events{/privacy}","received_events_url":"https://api.github.com/users/nanshe-org/received_events","type":"Organization","site_admin":false},"repo":{"id":69266639,"name":"docker_nanshe_notebook","full_name":"nanshe-org/docker_nanshe_notebook","owner":{"login":"nanshe-org","id":14901684,"avatar_url":"https://avatars2.githubusercontent.com/u/14901684?v=4","gravatar_id":"","url":"https://api.github.com/users/nanshe-org","html_url":"https://github.com/nanshe-org","followers_url":"https://api.github.com/users/nanshe-org/followers","following_url":"https://api.github.com/users/nanshe-org/following{/other_user}","gists_url":"https://api.github.com/users/nanshe-org/gists{/gist_id}","starred_url":"https://api.github.com/users/nanshe-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nanshe-org/subscriptions","organizations_url":"https://api.github.com/users/nanshe-org/orgs","repos_url":"https://api.github.com/users/nanshe-org/repos","events_url":"https://api.github.com/users/nanshe-org/events{/privacy}","received_events_url":"https://api.github.com/users/nanshe-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nanshe-org/docker_nanshe_notebook","description":"A docker container with nanshe and the Jupyter Notebook installed","fork":false,"url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook","forks_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/forks","keys_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/teams","hooks_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/hooks","issue_events_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/issues/events{/number}","events_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/events","assignees_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/assignees{/user}","branches_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/branches{/branch}","tags_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/tags","blobs_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/git/refs{/sha}","trees_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/statuses/{sha}","languages_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/languages","stargazers_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/stargazers","contributors_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/contributors","subscribers_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/subscribers","subscription_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/subscription","commits_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/commits{/sha}","git_commits_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/git/commits{/sha}","comments_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/comments{/number}","issue_comment_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/issues/comments{/number}","contents_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/contents/{+path}","compare_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/merges","archive_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/downloads","issues_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/issues{/number}","pulls_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/pulls{/number}","milestones_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/milestones{/number}","notifications_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/labels{/name}","releases_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/releases{/id}","deployments_url":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/deployments","created_at":"2016-09-26T15:55:08Z","updated_at":"2018-04-30T06:32:48Z","pushed_at":"2018-05-01T03:03:39Z","git_url":"git://github.com/nanshe-org/docker_nanshe_notebook.git","ssh_url":"git@github.com:nanshe-org/docker_nanshe_notebook.git","clone_url":"https://github.com/nanshe-org/docker_nanshe_notebook.git","svn_url":"https://github.com/nanshe-org/docker_nanshe_notebook","homepage":null,"size":30,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/pulls/27"},"html":{"href":"https://github.com/nanshe-org/docker_nanshe_notebook/pull/27"},"issue":{"href":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/issues/27"},"comments":{"href":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/nanshe-org/docker_nanshe_notebook/statuses/5f8613a888e600a788af526146a996286a9aa620"}},"author_association":"OWNER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"jakirkham","id":3019665,"avatar_url":"https://avatars1.githubusercontent.com/u/3019665?v=4","gravatar_id":"","url":"https://api.github.com/users/jakirkham","html_url":"https://github.com/jakirkham","followers_url":"https://api.github.com/users/jakirkham/followers","following_url":"https://api.github.com/users/jakirkham/following{/other_user}","gists_url":"https://api.github.com/users/jakirkham/gists{/gist_id}","starred_url":"https://api.github.com/users/jakirkham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakirkham/subscriptions","organizations_url":"https://api.github.com/users/jakirkham/orgs","repos_url":"https://api.github.com/users/jakirkham/repos","events_url":"https://api.github.com/users/jakirkham/events{/privacy}","received_events_url":"https://api.github.com/users/jakirkham/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":6,"deletions":2,"changed_files":1}}
{"actor":{"display_login":"jakirkham"}}