I found a Docker package for Jupyterlab and it comes with the IJavaScript kernel:
docker run -d -p 8888:8888 liuderchi/jupyterlab-ijavascript:latest
I can create a new notebook using JavaScript.
How do I install NPM packages in this notebook?
I tried running a system command using % but I get an error:
> %npm ls
evalmachine.<anonymous>:1
%npm ls
^
SyntaxError: Unexpected token %
at new Script (vm.js:73:7)
at createScript (vm.js:245:10)
at Object.runInThisContext (vm.js:297:10)
at run ([eval]:1002:15)
at onRunRequest ([eval]:829:18)
at onMessage ([eval]:789:13)
at process.emit (events.js:182:13)
at emit (internal/child_process.js:811:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
Related
I am running this command on my mac machine:
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
But I got this error:
Warning: Failed to create the file wp-cli.phar: Read-only file system
What should I do?
According to the venv documentation in Python3:
Changed in version 3.5: The use of venv is now recommended for creating virtual environments.
With Python3.6 installed in my Ubuntu 16, I tried to create a Python project with command python3 -m venv project, but got the following error:
Error: Command '['/home/me/git/project/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
Question: Why could this have happened? and how to resolve?
sudo apt-get install -y python3-pip is worth a try, based on https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-16-04-server
If that fails, what does python3 --version print?
I managed to install the following package on my local RStudio session:
install.packages("devtools")
devtools::install_github("tidyverse/googlesheets4")
I am now trying to install it directly in the Dockerfile of my RStudio session on my server.
For that, below the line:
RUN R -e "install.packages(c('DT', 'shiny', 'DBI', 'devtools'))"
I have added:
RUN R -e "devtools::install_version('tidyverse/googlesheets4')"
But when I launch the docker-compose up -d command I get this error:
Error in package_find_repo(package, repos) : couldn't find package
'tidyverse/googlesheets4' Calls: ... ->
download_version_url -> package_find_repo Execution halted ERROR:
Service 'rstudio' failed to build: The command '/bin/sh -c R -e
"devtools::install_version('tidyverse/googlesheets4')"' returned a
non-zero code: 1
Do you know what could be the issue?
Thanks a lot.
I am running jupyter notebooks but when trying to install software with:
!pip install ipython-sql
it returns this error:
copying build/lib.linux-x86_64-2.7/prettytable.py -> /usr/local/lib/python2.7/dist-packages
error: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/prettytable.py'
And below, in red letter:
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-6I8SLA/prettytable/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-nL3KsL-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-6I8SLA/prettytable/
That is all information I have. Any idea how to fix it?
I recreated your problem and solved it using:
!pip install ipython-sql --user
I use Linux Mint and Python 3.4. Using the --user flag stores libraries in your home directory, in my case under ~/.local/lib/python3.4/site-packages.
I'm trying to use the qmlrs Rust bindings to Qt, but I cannot compile. I've installed all dependencies.
Rust 1.9.0
Cargo 0.10.0-nightly (10ddd7d 2016-04-08)
Cargo build log:
error: failed to run custom build command for `qmlrs v0.1.1`
Process didn't exit successfully: `/home/pedro/Documents/repositories
/rust-sample/target/debug/build/qmlrs-e7d90e9b9c603e6f/build-script-
build` (exit code: 101)
--- stdout
cargo:rustc-link-lib=static=qmlrswrapper
cargo:rustc-link-lib=dylib=stdc++
cargo:rustc-link-search=native=/home/pedro/.cargo/registry/src/github.com-
88ac128001ac3a9a/qmlrs-0.1.1/ext/libqmlrswrapper/build
--- stderr
thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value:
"`\"pkg-config\" \"--libs\" \"--cflags\" \"Qt5Core Qt5Gui Qt5Qml
Qt5Quick\"` did not exit successfully: exit code: 1\n--- stdout\nPackage
Qt5Qml was not found in the pkg-config search path.\nPerhaps you should
add the directory containing `Qt5Qml.pc\'\nto the PKG_CONFIG_PATH
environment variable\nNo package \'Qt5Qml\' found\nPackage Qt5Quick was
not found in the pkg-config search path.\nPerhaps you should add the
directory containing `Qt5Quick.pc\'\nto the PKG_CONFIG_PATH environment
variable\nNo package \'Qt5Quick\' found\n"', ../src/libcore/result.rs:746
note: Run with `RUST_BACKTRACE=1` for a backtrace.
You should install a Qt's -dev package that provides the file. Here's a hint how you can find relevant package using apt-file (in case you are using Debian-derived distribution).
In your case the error message says
Perhaps you should add the directory containing Qt5Qml.pc, so:
$ sudo apt install apt-file && sudo apt update
$ apt-file search Qt5Qml.pc
>>> qtdeclarative5-dev: /usr/lib/x86_64-linux-gnu/pkgconfig/Qt5Qml.pc
$ sudo apt install qtdeclarative5-dev