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

Instructions for virtualenv installation #95

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,18 @@ After this, you will have a directory containing files used for creating a
custom Jupyter widget. To check that eveything is set up as it should be,
you should run the tests:

Create a dev environment:
Either create a dev environment with [conda](https://www.anaconda.com/):
```bash
conda create -n {{ cookiecutter.python_package_name }}-dev -c conda-forge nodejs yarn python jupyterlab
conda activate {{ cookiecutter.python_package_name }}-dev
```

Or create a virtual environment (requires [virtualenvwrapper](https://virtualenvwrapper.readthedocs.io/en/latest/) and [npm](https://www.npmjs.com/)):
```bash
mkvirtualenv {{ cookiecutter.python_package_name }}-dev
npm install yarn
```

Install the python. This will also build the TS package.

```bash
Expand Down Expand Up @@ -80,6 +86,11 @@ the `install` command every time that you rebuild your extension. For certain in
you might also need another flag instead of `--sys-prefix`, but we won't cover the meaning
of those flags here.

Finally, if you use a virtual environment, you need to install it as a new kernel to IPython:
Copy link
Contributor

@ianhi ianhi Mar 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need to? Like if I activate that venv and install jlab from there is this step still necessary?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my experience yes. No matter from which environment I launch Jupyter Lab, it always offers me all of the installed kernels, with the launching environment not necessarily being part of it.


```
ipython kernel install --name {{ cookiecutter.python_package_name }}-dev --user
```

### How to see your changes
#### Typescript:
Expand Down