Skip to content

Commit

Permalink
Merge pull request #126 from vpython/webpack-fix-2020-08-15
Browse files Browse the repository at this point in the history
Webpack fix 2020 08 15
  • Loading branch information
sspickle committed Nov 9, 2020
2 parents 54acc9f + ec84d3b commit 6d5b631
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 5 deletions.
38 changes: 36 additions & 2 deletions labextension/vpython/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,42 @@ Except where the tutorial says: `conda install -c conda-forge jupyterlab=2`, use
and tailor the instructions for creating a vpython labextension. Also, the tutorial command
`jupyter lab --watch` will fail. Just use `jupyter lab`.

The original instructions below caused trouble for me (steve, I got various React errors) but this is what worked:

1) Create and activate a conda environment, and then install jupyterlab:

conda create -n jupyterlab-ext --override-channels --strict-channel-priority -c conda-forge -c anaconda jupyterlab cookiecutter nodejs git

conda activate jupyterlab-ext

conda install -c conda-forge jupyterlab=1

2) git clone the repository (the branch from the pull request) somewhere using whatever git machinery you prefer.

Then “cd” into the ‘vpython-jupyter/labextension/vpython’ of that repository.

3) In the ‘vpython-jupyter/labextension/vpython’ directory of that repository execute:

cp -r ../../vpython/vpython_{libraries,data} .

yarn install

jupyter labextension install .

4) Install vpyton in this virtual environment:

cd ../..

pip install -e .

And then to run a lab notebook:

jupyter lab

Then you should be able to import vpython now and run notebooks in jupyterlab.

Original instructions:

```bash
jlpm install
jlpm add @jupyterlab/application
Expand All @@ -45,5 +81,3 @@ To rebuild the package and the JupyterLab app:
jlpm run build
jupyter lab build
```


6 changes: 3 additions & 3 deletions labextension/vpython/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6d5b631

Please sign in to comment.