Code Monkey home page Code Monkey logo

Comments (4)

ian-r-rose avatar ian-r-rose commented on June 6, 2024

It should be installed to the same directory that is listed when you run jupyter lab path. If you are using conda I would expect it to already be in a user install. Is there a reason that you have specified /home/goerz/.conda/envs/default/bin/jupyter, rather than the one in your current environment?

from jupyterlab-toc.

goerz avatar goerz commented on June 6, 2024

Ah, yes, I just found jupyterlab/jupyterlab#4064 (comment) which provides the workaround.

Specifically, I had to do the following:

  • Copy the contents of /usr/local/anaconda/share/jupyter/lab/ to ~/.local/share/jupyter/lab/
  • Add export JUPYTERLAB_DIR=$HOME/.local/share/jupyter/lab to my .bashrc

This got me at least a step further:

goerz@mlhpc2:~> jupyter labextension install jupyterlab-toc
> /usr/bin/npm pack jupyterlab-toc
jupyterlab-toc-0.2.1.tgz
> node /home/goerz/.conda/envs/default/lib/python3.6/site-packages/jupyterlab/staging/yarn.js install
yarn install v1.5.1
warning You are using Node "4.2.6" which is not supported and may encounter bugs or unexpected behavior. Yarn supports the following semver range: "^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0"
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
error [email protected]: The engine "node" is incompatible with this module. Expected version ">= 4.8 < 5.0.0 || >= 5.10".
error An unexpected error occurred: "Found incompatible module".
info If you think this is a bug, please open a bug report with the information provided in "/home/goerz/.local/share/jupyter/lab/staging/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
> node /home/goerz/.conda/envs/default/lib/python3.6/site-packages/jupyterlab/staging/yarn.js run build:prod
yarn run v1.5.1
warning You are using Node "4.2.6" which is not supported and may encounter bugs or unexpected behavior. Yarn supports the following semver range: "^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0"
$ webpack --config webpack.prod.config.js
sh: 1: webpack: not found
error An unexpected error occurred: "Command failed.
Exit code: 127
Command: sh
Arguments: -c webpack --config webpack.prod.config.js
Directory: /home/goerz/.local/share/jupyter/lab/staging
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "/home/goerz/.local/share/jupyter/lab/staging/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Do you think the problem is simply the version of Node that the installation warns about? If so, I'll have to figure out how to update that...

/home/goerz/.conda/envs/default/bin/jupyter actually is the current jupyter, I just wrote out the full path to make sure it wouldn't get confused by the the "system" /usr/local/anaconda/bin/jupyter.

from jupyterlab-toc.

ian-r-rose avatar ian-r-rose commented on June 6, 2024

Yes, I expect that version of node to be a problem. I think you will want to install at least node v6.

It looks to me like your environment was getting confused about the different jupyters, since it was trying to install into the system one rather than your user one.

from jupyterlab-toc.

goerz avatar goerz commented on June 6, 2024

Ok, I think I got it working. Thanks!

Took me a while to find https://github.com/jupyterlab/jupyterlab/blob/master/CONTRIBUTING.md that points out you can install nodejs in your home directory via conda!

I'll close this issue for now, but it might be good to add a few lines to the README explaining some of these tricks. I imagine installing jupyter on a server without root access is somewhat common in the scientific computing space.

from jupyterlab-toc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.