You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by 1ambda <gi...@git.apache.org> on 2017/01/08 05:20:46 UTC
[GitHub] zeppelin pull request #1868: [ZEPPELIN-1917] Improve python.conda interprete...
GitHub user 1ambda opened a pull request:
https://github.com/apache/zeppelin/pull/1868
[ZEPPELIN-1917] Improve python.conda interpreter
### What is this PR for?
Add missing commands to the `python.conda` interpreter
- `conda info`
- `conda list`
- `conda create`
- `conda install`
- `conda uninstall (alias of remove)`
### What type of PR is it?
[Improvement | Refactoring]
### Todos
* [x] - info
* [x] - list
* [x] - create
* [x] - install
* [x] - uninstall (= remove)
### What is the Jira issue?
[ZEPPELIN-1917](https://issues.apache.org/jira/browse/ZEPPELIN-1917)
### How should this be tested?
1. Install [miniconda](http://conda.pydata.org/miniconda.html)
2. Remove `test` conda env before creating
```sh
$ conda env remove --yes --name test
```
3. Run these commands with `%python.conda`
```
%python2.conda info
%python2.conda env list
%python2.conda create --name test
# you should be able to see `test` in the list
%python2.conda env list
%python2.conda activate pymysql
%python2.conda install pymysql
# you should be able to import
%python2
import pymysql.cursors
%python2.conda uninstall pymysql
%python2.conda deactivate pymysql
# you should be able to see `No module named pymysql.cursor` since we deactivated
%python2
import pymysql.cursors
```
### Screenshots (if appropriate)
![conda-screenshot](https://cloud.githubusercontent.com/assets/4968473/21747565/98c0e366-d5ad-11e6-8000-e293996089fa.gif)
### Questions:
* Does the licenses files need update? - NO
* Is there breaking changes for older versions? - NO
* Does this needs documentation? - NO
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/1ambda/zeppelin ZEPPELIN-1917/improve-conda-interpreter
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/zeppelin/pull/1868.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1868
----
commit 8559998f7266c905e9fd115f6ef4fa90e674555a
Author: 1ambda <1a...@gmail.com>
Date: 2017-01-07T04:33:17Z
fix: Use specific command for env list in conda
commit e080988cfea6e3d9f79f95e9a06986fdaeaf692d
Author: 1ambda <1a...@gmail.com>
Date: 2017-01-07T04:39:12Z
refactor: PythonCondaInterpreter.interpret
commit 6ef9ca1052ea8bbc3d0a20aed37a57c4319e99f8
Author: 1ambda <1a...@gmail.com>
Date: 2017-01-07T04:39:39Z
style: Remove useless newlines
commit 9a0f4aa95caf436fc6f8e910efcd1d2a814fdd60
Author: 1ambda <1a...@gmail.com>
Date: 2017-01-07T05:11:51Z
feat: Add info command
commit 6189dea469f3d2285c56fa0323811531d683122b
Author: 1ambda <1a...@gmail.com>
Date: 2017-01-07T05:12:25Z
refactor: Add private to member vars
commit aaa85023f4cf12d7719035114b45b4c43152b46c
Author: 1ambda <1a...@gmail.com>
Date: 2017-01-07T05:14:14Z
style: Rename some funcs
commit 8e8dcf8f6264c6632d7d63ae0f9b1cb02b622631
Author: 1ambda <1a...@gmail.com>
Date: 2017-01-07T05:19:37Z
refactor: Simplify exception flow so private funcs don't need care exceptions
commit c8c7c3201fab3f171187490a5fb3e13d0280f3ac
Author: 1ambda <1a...@gmail.com>
Date: 2017-01-07T05:22:33Z
refactor: Import InterpreterResult.{Code, Type} to short codes
commit eb08b872b6c7a583c7f9b1db83a5e4e8a508a6f1
Author: 1ambda <1a...@gmail.com>
Date: 2017-01-07T05:46:38Z
feat: Add list conda command
commit 0074a6e60b56d05f86f210f1bd109191acb9003e
Author: 1ambda <1a...@gmail.com>
Date: 2017-01-07T07:41:21Z
feat: Make conda output beautiful
commit ff791c633f009f412c38326c8e3ba684c9367843
Author: 1ambda <1a...@gmail.com>
Date: 2017-01-07T07:41:31Z
docs: Add missing conda list description
commit dc5f06873470a6e3587f9bad574a422465883447
Author: 1ambda <1a...@gmail.com>
Date: 2017-01-08T01:24:37Z
feat: Add conda create
commit d6485e42a604bac2e9275a60a87510899e9c3e78
Author: 1ambda <1a...@gmail.com>
Date: 2017-01-08T01:33:32Z
feat: Add conda install
commit fd7f750ab66d9a6d837d2e3704f0898f689bf24a
Author: 1ambda <1a...@gmail.com>
Date: 2017-01-08T02:20:52Z
feat: Add conda remove (uninstall)
commit 86547d93f37328ce575d62ed292fed1eb8ffb6e8
Author: 1ambda <1a...@gmail.com>
Date: 2017-01-08T02:58:24Z
refactor: Abstract commands
commit 0309475ee40c243542ab40ee9e56fcaf7a63173e
Author: 1ambda <1a...@gmail.com>
Date: 2017-01-08T03:27:38Z
fix: minor
commit 594f83cdc33b51ea1cfd36b7e0882ca14110efb2
Author: 1ambda <1a...@gmail.com>
Date: 2017-01-08T04:36:21Z
refactor: Activate, Deactivate
commit 427443cd35d461df8baf9363462ca2934cce510b
Author: 1ambda <1a...@gmail.com>
Date: 2017-01-08T05:11:25Z
fix: NPE in PythonProcess
java.lang.NullPointerException
at org.apache.zeppelin.python.PythonProcess.sendAndGetResult(PythonProcess.java:113)
at org.apache.zeppelin.python.PythonInterpreter.sendCommandToPython(PythonInterpreter.java:250)
at org.apache.zeppelin.python.PythonInterpreter.bootStrapInterpreter(PythonInterpreter.java:272)
at org.apache.zeppelin.python.PythonInterpreter.open(PythonInterpreter.java:100)
at org.apache.zeppelin.python.PythonCondaInterpreter.restartPythonProcess(PythonCondaInterpreter.java:139)
at org.apache.zeppelin.python.PythonCondaInterpreter.interpret(PythonCondaInterpreter.java:88)
at org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:94)
at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:494)
at org.apache.zeppelin.scheduler.Job.run(Job.java:175)
at org.apache.zeppelin.scheduler.FIFOScheduler$1.run(FIFOScheduler.java:139)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #1868: [ZEPPELIN-1917] Improve python.conda interpreter
Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the issue:
https://github.com/apache/zeppelin/pull/1868
LGTM and merge to master if no more discussions
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #1868: [ZEPPELIN-1917] Improve python.conda interpreter
Posted by 1ambda <gi...@git.apache.org>.
Github user 1ambda commented on the issue:
https://github.com/apache/zeppelin/pull/1868
@Leemoonsoo now `python.conda` support other `env *` commands :)
<img width="709" alt="env remove" src="https://cloud.githubusercontent.com/assets/4968473/21827211/0130cd40-d7ce-11e6-8925-4757c6a2d6fc.png">
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin pull request #1868: [ZEPPELIN-1917] Improve python.conda interprete...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/zeppelin/pull/1868
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #1868: [ZEPPELIN-1917] Improve python.conda interpreter
Posted by 1ambda <gi...@git.apache.org>.
Github user 1ambda commented on the issue:
https://github.com/apache/zeppelin/pull/1868
@Leemoonsoo Thanks for review!
If https://github.com/apache/zeppelin/pull/1874 is merged soon, I can rewrite the whole `conda env *` commands based on #1874
since current implementation requires some formatting.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #1868: [ZEPPELIN-1917] Improve python.conda interpreter
Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the issue:
https://github.com/apache/zeppelin/pull/1868
Great improvement! Tested and LGTM.
Is it on purpose not supporting `conda env remove` ?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---