Can not use Elixir in jupyter notebook - jupyter-notebook

Question Summary
I'm trying to use Elixir in jupyter notebook but IElixir doesn't work.
Does somebody know how to solve below error & use Elixir in jupyter notebook?
Environments
OS Ubuntu ver.“18.04.3 LTS (Bionic Beaver)”
CPU Intel Core i7-7700HQ 2.80GHz
RAM 16GB
GPU NVIDIA GeForce GTX 1600 Mobile
Version Information
anaconda 4.7.12
jupyter 1.0.0
elixir 1.9.4
What I did & stacking points
I refer to IElixir github comments to built a deverop environment.
https://github.com/pprzetacznik/IElixir
Progressed Situation
Repository clone (done)
git clone https://github.com/pprzetacznik/IElixir.git
cd IElixir
Built IElixir (Stacking Point)
mix deps.get
mix test
MIX_ENV=prod mix compile
Error was happen in mix test
kojiro#Inspiron7577:~/IElixir$ mix test
===> Compiling esqlite
===> Compiling /home/kojiro/IElixir/deps/esqlite/c_src/esqlite3_nif.c
===> /home/kojiro/IElixir/deps/esqlite/c_src/esqlite3_nif.c:25:10: fatal error: sqlite3.h: ãã®ãããªãã¡ã¤ã«ã ãã£ã¬ã¯ããªã¯ããã¾ãã #include “sqlite3.h” ^~~~~~~~~~~ compilation terminated.
** (Mix) Could not compile dependency :esqlite, “/home/kojiro/.mix/rebar3 bare compile --paths=”/home/kojiro/IElixir/_build/test/lib/*/ebin"" command failed. You can recompile this dependency with “mix deps.compile esqlite”, update it with “mix deps.update esqlite” or clean it with “mix deps.clean esqlite”
first time, I thought error caused by esqlite could not compile in Mix.
so I tried all of error commented command but error doesn't solved.
What I did to solve this error
I follow to IElixir github comment.
use mix local.rebar --force
add ~/.mix/ to PATH then try mix test again.
(base) kojiro#Inspiron7577:~/IElixir$ export PATH="$PATH:~/.mix/"
but error doensn't solved.
I already tried to search "Could not compile dependency :esqlite" but all environmentl situation is different.
Does someone know how to solve this situation?

I am not familiar with this problem, however I found some resources that might help you get Elixir working in jupyter (if ever you didn't already found them !) :
This medium post take you step by step through the installation, and also mention that is a Docker image that exists for it.
you can also find an installation tutorial with Docker here (different from the above mentioned one)
Hope it helps.

Related

Has anyone been able to successfully run julia on a Jupyter notebook over ssh?

I've had so much trouble trying to install Julia and learn how to use it with jupyter over ssh (ssh for reasons that are to complicated to explain). I am unable to even install IJulia without error. I've followed steps from here and several other places with no luck. When I initially run Pkg.add("IJulia") it's able to install the dependencies but IJulia itself doesn't compile. I try running Pkg.build("IJulia") with no issue, but when I open a julia notebook, the kernel never actually runs. When I try to go back to the julia prompt and run using IJulia, I get errors like the following:
ERROR: LoadError: InitError: SystemError: opening file "[blabla]/mambaforge/envs/jul/share/julia/cert.pem": No such file or directory
and
ERROR: Failed to precompile IJulia [7073ff75-c697-5162-941a-fcdaad2a7d2a] to [blabla]/mambaforge/envs/jul/share/julia/compiled/v1.7/IJulia/jl_yfN9Cx.
I've been suffering this for weeks. I feel like it shouldn't be this difficult to get into this language. Has anyone else had issues like this and been able to solve them?
Are you using Ubuntu? I encountered a similar problem in Ubuntu 20.04 recently. I wanted to install IJulia under an anaconda environment but faced the problem that the file {JULIA_DIR}/share/julia/cert.pem (in my case, this file has a path of /home/pc/anaconda3/envs/julia-workspace/share/julia/cert.pem).
The first reference I find on the internet is a solution on the julia discourse. (Actually there is a mistake in this answer, at least on my operation system, that the file that the symbolic link is created from, is /etc/ssl/certs/ca-certificates.crt , not /etc/ssl/certs/ca-certificates.crt )
The problem I faced at this time is that the file /etc/ssl/certs/ca-certificates.crt does not exist! How can it happens? I find this reference that guides me to generate the file ca-certificates.crt (by the way, you may need sudo to run the command update-ca-certificates, which updates the directory /etc/ssl/certs to hold SSL certificates and generates ca-certificates.crt)

Setting up Yocto on my Ubuntu (Ubuntu 18.04.3 LTS/bionic) with error "ImportError: No module named '_sqlite3'"

my first posting on setting up Yocto development environment
on my Ubuntu system (Ubuntu 18.04.3 LTS/bionic), based on the information enclosed in the document from
this web link (https://www.yoctoproject.org/docs/current/brief-yoctoprojectqs/brief-yoctoprojectqs.html).
All is well until... ~/poky/build$ bitbake core-image-sato
which results in this error:
File "/usr/local/lib/python3.5/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ImportError: No module named '_sqlite3'
Below is my effort to proceed past this error, which didn't resolve the
error above. Please be generous and provide some guidance. I searched for
relevant posting locations; any advice on a better place is appreciated.
Thank you.
------------------------------------------------
A web search on this error () results in:
How to Use SQLite in Ubuntu | Chron.com
with
~/poky/build$ sudo apt-get install sqlite3 libsqlite3-dev
which tells me this:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libsqlite3-dev is already the newest version (3.22.0-1ubuntu0.1).
sqlite3 is already the newest version (3.22.0-1ubuntu0.1).
The following packages were automatically installed and are no longer
required:
linux-headers-5.0.0-23 linux-headers-5.0.0-23-generic linux-image-5.0.0-23-generic linux-modules-5.0.0-23-generic
linux-modules-extra-5.0.0-23-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.
So, evidently sqlite3 exists on my system. Here are the SO references that I checked:
[ImportError: No module named '_sqlite3' in python3.3][1]
[importerror no module named '_sqlite3' python3.4][2]
[ImportError: No module named _sqlite3 (even after doing eveything)][3]
[ImportError: No module named _sqlite3][4]
[1]: https://stackoverflow.com/questions/20126475/importerror-no-module-named-sqlite3-in-python3-3
[2]: https://stackoverflow.com/questions/24052137/importerror-no-module-named-sqlite3-python3-4
[3]: https://stackoverflow.com/questions/35889383/importerror-no-module-named-sqlite3-even-after-doing-eveything
[4]: https://stackoverflow.com/questions/2665337/importerror-no-module-named-sqlite3
I have just kicked off a build verifying the Brief-Quickstart steps verbatim on an otherwise fresh Ubuntu 18.04 install. There is not even SQLite installed at all, yet the build proceeds nicely. So the chances are pretty high the python installation in your development host is busted in some way or the other. Yet, there might be reasons for it:
you maybe selected python 3.5 explicitly because some other thing you did requires it
you maybe selected python 3.5 implicitly because you forwarded from on old installation, installed something that depended on it, or similar.
In any case, I'd guess that now tinkering with the link might break things somewhere else on your machine, which should be avoided IMHO.
So what are your options now? My advice would be to start building in a container, in the simplest for that requires no more than installing docker and kicking off docker run -it ubuntu:bionic /bin/bash - at least to verify things are generally working.
In the longer term you might want to make a specialized container for this with one or two additions:
1) have all the needed packages set up already
2) using a standard user instead of root.
This is the way I do things personally. An alternative would be to use the prepared things by CROPS as it is a known good solution, and it significantly reduces problems originating from host system pecularities.

TypeScript compiler failing on a mac

Typescript compilation task works fine on linux machines but on a mac fails with the following not particularly useful error message and what looks like a binary dump.
$ grunt
Running "ts:build" (ts) task
Compiling...
Fast compile will not work when --out is specified. Ignoring fast compilation
Using tsc v1.4.1
������������=��AF���=����
>> Error: tsc return code: 3
Warning: Task "ts:build" failed. Use --force to continue.
Aborted due to warnings.
Im using nvm with node v0.11.4 and rvm with ruby v2.2.0.
Any ideas how to fix this, or even debug?
As the question includes debugging, here are some pointers which might help determine where the problem is.
Try compiling from the command line with tsc alone (no grunt), in case the problem is with grunt or the ts:build task (looks like grunt-ts).
Maybe one of your source files is causing the tools to crash (perhaps they can't cope with a file's encoding?). If a single, simple file will compile, then try removing subsets of your source from the build. If some of those files are causing the crash (whether valid TypeScript or not) you may be able to find a temporary workaround.
Try compiling with different versions of tsc. If you need 1.4.1 features you could try using the latest from https://github.com/Microsoft/TypeScript (see here for how to do this with grunt-ts).
The problem was with a malfunctioning node installation. I upgraded to node 0.12 which fixed the problem.
Just to check the problem wasn't node 0.11.4 specific I removed all previous versions of node and reinstalled 0.11.4 and the error no longer occurs.
I took these steps after removing all node modules, clearing the cache and reinstalling with no luck. I also tried using multiple typescript compiler versions.

building brackets was "Done, without errors" in Debian Wheezy, but

i was trying to build "brackets sprint 40" from source code (by following #jasonsanjose instructions look #4816 and the official wiki's page here) in my 32bit Wheezy, Using CEF3 (Verion 3.1547.1406_linux32_release with glibc 2.13) and everything was OK .
when i ran grunt build and grunt installer the output was: Running "build" task
Running "build-linux" task
Done, without errors.
and when i installed .deb package and executed it in the terminal , this error has been thrown:brackets: libcef_dll/wrapper/libcef_dll_wrapper.cc:120: int CefExecuteProcess(const CefMainArgs&, CefRefPtr): Assertion `false' failed.
Aborted
I did rebuild it many times, but the problem persist.
And this is where i stopped, i don't know where the problem lies.
some help will be appreciated, thank you in advance.
There's a duplicate of this question with longer discussion posted here - https://github.com/adobe/brackets/issues/8170.
Note: This problem shouldn't affect a "vanilla" brackets-shell build on Linux -- it's specific to a hack some people have developed to support an older version of Debian than Brackets officially supports. This requires swapping in a newer version of the CEF library, which is not always easy to do since they are not usually backwards-compatible.

Error -1001 in clGetPlatformIDs Call !

I am trying to start working with OpenCL. I have two NVidia graphics card, I installed "developer driver" as well as SDK from NVidia website. I compiled the demos but when I run
./oclDeviceQuery
I see:
OpenCL SW Info:
Error -1001 in clGetPlatformIDs Call
!!!
How can I fix it? Does it mean my nvidia cards cannot be detected? I am running Ubuntu 10.10 and X server works properly with nvidia driver.
I am pretty sure the problem is not related to file permissions as it doesn't work with sudo either.
In my case I have solved it by installing nvidia-modprobe package available in ubuntu (utopic/multiverse). And the driver itself (v346) was installed from https://launchpad.net/~mamarley/+archive/ubuntu/nvidia
Concretely, I have installed nvidia-opencl-icd-346, nvidia-libopencl1-346, nvidia-346-uvm, nvidia-346 and libcuda1-346. Not sure if they are all needed for OpenCL.
This is a result of not installing the ICD portion of Nvidia's openCL runtime. The ICD profile will instruct your application of the different openCL implementations installed on the system as multiple implementations from different vendors can coexist. Whe your application does not find the ICD information it gives the Error -1001.
Run your program as root. In case of success: you have trouble with cl_khr_icd- extension to load the vendor driver.
If you not running X11, you have to create device files manually or by (boot-)script:
ERROR: clGetPlatformIDs -1001 when running OpenCL code (Linux)
Same problem for me on a Linux system. Solution is to add the user to the video group:
# sudo usermod -aG video your-user-name
Since I just spend a couple of hours on this, I thought I would share:
I got the error because I was connected to the machine per remote desktop (mstsc). On the machine itself everything worked fine.
I have been told that it should work with TeamViewer by the way.
Dont know if you ever solved this problem, but I had the same issue and solved it in this post: ERROR: clGetPlatformIDs -1001 when running OpenCL code (Linux)
Hope it helps!
I have solved it in Ubuntu 13.10 saucy for intel opencl by created link:
sudo ln -s /opt/intel/opencl-1.2-3.2.1.16712/etc/intel64.icd /etc/OpenCL/vendors/nvidia.icd
I just ran into this problem on ubuntu 14.04 and I could not find ANY working answers anywhere online including this thread (though this was the first to show up on google). What ended up working for me was to remove ALL previous nvidia software and then to reinstall it using the .run file provided on the nvidia website. Installing the components through apt-get seems to fail for some reason.
1) Download CUDA .run file: https://developer.nvidia.com/cuda-downloads
2) Purge all previous nvidia packages
sudo apt-get purge nvidia-*
3) Install all run file components (you will likely have to stop X or restart in recovery mode to run this)
sudo sh cuda_X.X.XX_linux.run
This is because OpenCL has the same brain damaged one library per vendor setup that OpenGL has. A likely reason for the -1001 error is that you have compiled with a different library than the linker is trying to dynamically load.
So see if this is the problem run:
$ ldd oclDeviceQuery
...
libOpenCL.so.1 => important path here (0x00007fe2c17fb000)
...
Does the path point towards the NVidia-provided libOpenCL.so.1 file? If it doesn't, you should recompile the program with an -L parameter pointing towards the directory containing NVidia's libOpenCL.so.1. If you can't do that, you can override the linker's path like this:
$ LD_LIBRARY_PATH=/path/to/nvidias/lib ./oclDeviceQuery
For me, I was missing the CUDA OpenCL library, Running sudo apt install cuda-opencl-dev-12-0 solved it.
You should get number of platforms, allocate the memory for platforms, again get this platforms and then create context from this platform. There is good example:
http://developer.amd.com/support/KnowledgeBase/Lists/KnowledgeBase/DispForm.aspx?ID=71
This might be due to querying clGetPlatformIDs by multiple threads at the same time

Resources