Why JupyterLab not installed? - pipenv

I want to install Jupyter Lab from github, and do it, and all ok,
but I am getting the following exception:
"Exception: Jupyter command jupyter-lab not found."
What am I missing?
$ pipenv install -e git+git://github.com/jupyterlab/jupyterlab.git#egg=jupyterlab
Installing collected packages: ipython-genutils, decorator, six, traitlets, Send2Trash, attrs, pyrsistent, jsonschema, jupyter-core, nbformat, ptyprocess, tornado, terminado, python-dateutil, pyzmq, jupyter-client, entrypoints, testpath, MarkupSafe, jinja2, webencodings, bleach, pygments, defusedxml, pandocfilters, mistune, nbconvert, parso, jedi, wcwidth, prompt-toolkit, pickleshare, pexpect, backcall, ipython, ipykernel, prometheus-client, notebook, json5, jupyterlab-server, jupyterlab
Running setup.py develop for jupyterlab
Successfully installed MarkupSafe-1.1.1 Send2Trash-1.5.0 attrs-19.1.0 backcall-0.1.0 bleach-3.1.0 decorator-4.4.0 defusedxml-0.6.0 entrypoints-0.3 ipykernel-5.1.1 ipython-7.7.0 ipython-genutils-0.2.0 jedi-0.14.1 jinja2-2.10.1 json5-0.8.5 jsonschema-3.0.2 jupyter-client-5.3.1 jupyter-core-4.5.0 jupyterlab jupyterlab-server-1.0.0 mistune-0.8.4 nbconvert-5.5.0 nbformat-4.4.0 notebook-6.0.0 pandocfilters-1.4.2 parso-0.5.1 pexpect-4.7.0 pickleshare-0.7.5 prometheus-client-0.7.1 prompt-toolkit-2.0.9 ptyprocess-0.6.0 pygments-2.4.2 pyrsistent-0.15.4 python-dateutil-2.8.0 pyzmq-18.0.2 six-1.12.0 terminado-0.8.2 testpath-0.4.2 tornado-6.0.3 traitlets-4.3.2 wcwidth-0.1.7 webencodings-0.5.1
$ pipenv shell
$ jupyter --version
jupyter core : 4.5.0
jupyter-notebook : 6.0.0
qtconsole : not installed
ipython : 7.7.0
ipykernel : 5.1.1
jupyter client : 5.3.1
jupyter lab : not installed
nbconvert : 5.5.0
ipywidgets : not installed
nbformat : 4.4.0
traitlets : 4.3.2

Try running pip install jupyterlab that fixed it for me
Here are the docs to get it running
https://jupyterlab.readthedocs.io/en/stable/getting_started/installation.html

Related

opencv import error (libopencv_dnn.so.4.5 undefined symbol)

I'd like to utilize my Movidius Neural Compute Stick 1 (NCS1) to learn deep learning.
However, when I run a sample code, the following import error occurs:
python3 emotion.py -i sample.jpg -o result.jpg
Traceback (most recent call last):
File "emotion.py", line 1, in <module>
import cv2
File "/opt/intel/openvino/python/python3/cv2/__init__.py", line 129, in <module>
bootstrap()
File "/opt/intel/openvino/python/python3/cv2/__init__.py", line 112, in bootstrap
import cv2
ImportError: /opt/intel/openvino/opencv/lib/libopencv_dnn.so.4.5:
undefined symbol: _ZN15InferenceEngine5TBlobIhSt9enable_ifILb1EvEED1Ev
I'm using a Raspberry Pi 3B.
The OS is Raspberry Pi OS 32-bit (Legacy) Buster because Bullseye doesn't support NCS1.
OpenVINO Version is l_openvino_toolkit_runtime_raspbian_p_2020.3.194.tgz,
which is the last version that supports NCS1.
Here's how to reproduce.
I installed Raspberry Pi OS 32-bit (Legacy) Buster onto the microSD.
After some simple initial settings, I typed these commands to install the OpenVINO toolkit:
sudo mkdir -p /opt/intel/openvino
mkdir ~/download
cd ~/download
wget https://storage.openvinotoolkit.org/repositories/openvino/packages/2020.3/l_openvino_toolkit_runtime_raspbian_p_2020.3.194.tgz
sudo tar -xf l_openvino_toolkit_runtime_raspbian_p_2020.3.194.tgz --strip 1 -C /opt/intel/openvino
echo "source /opt/intel/openvino/bin/setupvars.sh" >> ~/.bashrc
source /opt/intel/openvino/bin/setupvars.sh
sudo usermod -a -G users "$(whoami)"
sh /opt/intel/openvino/install_dependencies/install_NCS_udev_rules.sh
In order to set up the OpenCV environment, I typed:
sudo apt update
sudo apt install -y python3-pip
sudo apt install -y libopencv-dev
sudo apt install -y python3-numpy
pip3 install pillow
That's it.
Then, I downloaded necessary images and codes, and ran emotion.py.
The whole contents of emotion.py doesn't matter here because only the first line gives me the error.
more -10 emotion.py
import cv2
import numpy as np
from PIL import ImageFont, ImageDraw, Image
import argparse
import sys
from openvino.inference_engine import IECore
frame_png = cv2.imread("frame_main.png", cv2.IMREAD_UNCHANGED)
face_png = cv2.imread("frame_face.png", cv2.IMREAD_UNCHANGED)
gender_png = cv2.imread("frame_gender.png", cv2.IMREAD_UNCHANGED)
Addtional Info:
pi#raspberrypi:~ $ python -VV
Python 2.7.16
pi#raspberrypi:~ $ python3 -VV
Python 3.7.3 (default, Oct 31 2022, 14:04:00)
[GCC 8.3.0]
Also, I tried to use berry-conda to do a similar thing with this answer.
But, it failed because the package libprotobuf is missing:
(After berry-conda installation)
pi#raspberrypi:/tmp $ which python
/home/pi/berryconda3/bin/python
pi#raspberrypi:/tmp $ which conda
/home/pi/berryconda3/bin/conda
pi#raspberrypi:/tmp $ python --version
Python 3.6.1
pi#raspberrypi:/tmp $ conda install -c defaults libprotobuf protobuf
Fetching package metadata .....
PackageNotFoundError: Package missing in current linux-armv7l channels:
- libprotobuf
This berry-conda installation completely changed my previous environment above.
I don't know if I should keep using berry-conda
or re-install Raspberry Pi OS 32-bit (Legacy) Buster again to do it from scratch.
Any suggestions would be greatly appreciated.
The error message is indicating that there is an issue with an undefined symbol in the libopencv_dnn.so.4.5 library, which suggests that there may be a compatibility issue between OpenVINO and the version of OpenCV installed on your system.
You could try reinstalling OpenVINO and making sure that it is properly configured with your system's version of OpenCV. You could also try updating or reinstalling OpenCV.

installation of OpenCV(cv2) in anaconda3 environment on Ubuntu 20.04 python 3.9.13.final.0

I've been trying to install cv2 on my machine (linux-Ubuntu20.04) with environment manager conda
my python and conda information is pasted below
Conda info:
active environment : base
active env location : /home/anonymous/anaconda3
shell level : 1
user config file : /home/anonymous/.condarc
populated config files : /home/anonymous/.condarc
conda version : 22.9.0
conda-build version : 3.22.0
python version : 3.9.13.final.0
virtual packages : __linux=5.15.0=0
__glibc=2.31=0
__unix=0=0
__archspec=1=x86_64
base environment : /home/anonymous/anaconda3 (writable)
conda av data dir : /home/anonymous/anaconda3/etc/conda
conda av metadata url : None
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /home/anonymous/anaconda3/pkgs
/home/anonymous/.conda/pkgs
envs directories : /home/anonymous/anaconda3/envs
/home/anonymous/.conda/envs
platform : linux-64
user-agent : conda/22.9.0 requests/2.28.1 CPython/3.9.13 Linux/5.15.0-52-generic ubuntu/20.04.5 glibc/2.31
UID:GID : 1000:1000
netrc file : None
offline mode : False
# conda environments:
#
base * /home/anonymous/anaconda3
sys.version: 3.9.13 (main, Oct 13 2022, 21:15:33)
[G...
sys.prefix: /home/anonymous/anaconda3
sys.executable: /home/anonymous/anaconda3/bin/python
conda location: /home/anonymous/anaconda3/lib/python3.9/site-packages/conda
conda-build: /home/anonymous/anaconda3/bin/conda-build
conda-content-trust: /home/anonymous/anaconda3/bin/conda-content-trust
conda-convert: /home/anonymous/anaconda3/bin/conda-convert
conda-debug: /home/anonymous/anaconda3/bin/conda-debug
conda-develop: /home/anonymous/anaconda3/bin/conda-develop
conda-env: /home/anonymous/anaconda3/bin/conda-env
conda-index: /home/anonymous/anaconda3/bin/conda-index
conda-inspect: /home/anonymous/anaconda3/bin/conda-inspect
conda-metapackage: /home/anonymous/anaconda3/bin/conda-metapackage
conda-pack: /home/anonymous/anaconda3/bin/conda-pack
conda-render: /home/anonymous/anaconda3/bin/conda-render
conda-repo: /home/anonymous/anaconda3/bin/conda-repo
conda-server: /home/anonymous/anaconda3/bin/conda-server
conda-skeleton: /home/anonymous/anaconda3/bin/conda-skeleton
conda-token: /home/anonymous/anaconda3/bin/conda-token
conda-verify: /home/anonymous/anaconda3/bin/conda-verify
user site dirs:
CIO_TEST: <not set>
CONDA_DEFAULT_ENV: base
CONDA_EXE: /home/anonymous/anaconda3/bin/conda
CONDA_PREFIX: /home/anonymous/anaconda3
CONDA_PROMPT_MODIFIER: (base)
CONDA_PYTHON_EXE: /home/anonymous/anaconda3/bin/python
CONDA_ROOT: /home/anonymous/anaconda3
I've been trying several days installing opencv(cv2) on conda base environment with this line of code:
conda install -c conda-forge opencv
conda install -c "conda-forge/label/broken" opencv
conda install -c "conda-forge/label/cf201901" opencv
conda install -c "conda-forge/label/cf202003" opencv
conda install -c "conda-forge/label/gcc7" opencv
i had tried
conda install -c menpo opencv
to but it didn't work for me.
for last try i run this code:
conda install --channel https://conda.anaconda.org/menpo opencv3
and i received this massage:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: |
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
- opencv3 -> python[version='2.7.*|3.4.*|3.5.*|3.6.*']
Your python: python=3.9
If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.
The following specifications were found to be incompatible with your system:
- feature:/linux-64::__glibc==2.31=0
- feature:|#/linux-64::__glibc==2.31=0
Your installed version is: 2.31
Any help is appreciated.

conda python 3.7 opencv import error libgnutls.so.30: undefined symbol: mpn_add_1, version HOGWEED_4

I am facing problem while getting opencv to work with python 3.7 in Conda on Ubuntu 20.04.
I get the following error when I try to import cv2 in python:
$ python
Python 3.7.8 | packaged by conda-forge | (default, Jul 23 2020, 03:54:19)
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: /home/swagat/anaconda3/envs/tf2py37/lib/python3.7/site-packages/../../././libgnutls.so.30: undefined symbol: mpn_add_1, version HOGWEED_4
my Conda configuration looks something like this:
active environment : tf2py37
active env location : /home/swagat/anaconda3/envs/tf2py37
shell level : 2
user config file : /home/swagat/.condarc
populated config files :
conda version : 4.8.5
conda-build version : 3.18.9
python version : 3.7.4.final.0
virtual packages : __cuda=10.1
__glibc=2.31
I installed opencv from the conda-forge channel using the following command:
$ conda install -c conda-forge opencv
I can see that opencv is installed on my system:
$ conda list opencv
# packages in environment at /home/swagat/anaconda3/envs/tf2py37:
#
# Name Version Build Channel
libopencv 4.5.0 py37_2 conda-forge
opencv 4.5.0 py37_2 conda-forge
py-opencv 4.5.0 py37hc6149b9_2 conda-forge
I also checked if gnutls is installed:
$ conda list gnutls
# packages in environment at /home/swagat/anaconda3/envs/tf2py37:
#
# Name Version Build Channel
gnutls 3.6.13 h79a8f9a_0 conda-forge
What else I can try to solve this problem? I am kind of stuck here. Any help will be appreciated. Thanks.
It seems that conda version of the opencv is broken.
My solution is:
remove your conda opencv and install the native one:
conda remove opencv
python -m pip install opencv-python # Execute this with your conda env activated

"cdk" command not found after installing python version

The "cdk" command is not found after installing with "pip install --upgrade aws-cdk.core" (per the docs).
The package successfully installs because it is found in the "site-packages" directory.
tennis.smith at C02TM089GY6N in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages
$ ls
README.txt cattr/ docopt-0.6.2.dist-info/ pip/ requests-2.22.0.dist-info/ typing_extensions.py
__pycache__/ cattrs-0.9.0.dist-info/ docopt.py pip-19.3.dist-info/ setuptools/ urllib3/
attr/ certifi/ easy_install.py pkg_resources/ setuptools-41.2.0.dist-info/ urllib3-1.25.6.dist-info/
attrs-19.3.0.dist-info/ certifi-2019.9.11.dist-info/ idna/ publication-0.0.3.dist-info/ six-1.12.0.dist-info/ wheel/
aws_cdk/ chardet/ idna-2.8.dist-info/ publication.py six.py wheel-0.33.6.dist-info/
aws_cdk.core-1.13.1.dist-info/ chardet-3.0.4.dist-info/ jsii/ python_dateutil-2.8.0.dist-info/ tests/ yarg/
aws_cdk.cx_api-1.13.1.dist-info/ dateutil/ jsii-0.19.0.dist-info/ requests/ typing_extensions-3.7.4.dist-info/ yarg-0.1.9.dist-info/
Any ideas why it isn't being detected?
To install the CDK CLI run npm install -g aws-cdk.

fabric-composer quick-start failed on ubuntu 16.04

I'm trying to follow the Fabric Composer Quickstart but failed.
Could you give me hints?
When I tried "sudo npm install", the script was completed with a few warnings.
npm WARN lifecycle getting-started#1.0.0~preinstall: cannot run in wd %s %s (wd=%s) getting-started#1.0.0 composer --version || echo 'Please first run npm install -g composer-cli' /<directory>/sample-applications/packages/getting-started
npm WARN lifecycle getting-started#1.0.0~install: cannot run in wd %s %s (wd=%s) getting-started#1.0.0 scripts/download-hyperledger.sh && scripts/start-hyperledger.sh && npm run deployNetwork /<directory>/sample-applications/packages/getting-started
When I tried "sudo composer network list -n digitalproperty-network --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d",
List business network digitalproperty-network
2017-03-21T22:44:47.360Z ERROR FSConnectionProfileStore :load() Failed to loaded connection profile defaultProfile {"0":{"stack":["{Error}ENOENT: no such file or directory, open '<directory>.composer-connection-profiles/defaultProfile/connection.json' Error: ENOENT: no such file or directory, open '<directory>.composer-connection-profiles/defaultProfile/connection.json'"," at Error (native)"]}}$
Failed to load connection profile defaultProfile
Command completed successfully.
I use
Ubuntu: 16.04
docker: 1.13.1
docker-compose: 1.11.2
node: v6.10.0
npm: 4.4.4
git: 2.11.0
composer:
composer-cli v0.5.5
composer-admin v0.5.5
composer-client v0.5.5
composer-common v0.5.5
composer-runtime-hlf v0.5.5
composer-connector-hlf v0.5.5
It looks like I have .composer-connection-profiles/defaultProfile/ direcotry but the directory don't have connection.js
How can we solve the problem? can i prepare connection.js manually?
Thank you!
This problem occurs when you run the npm install using sudo.
it shouldn't be necessary to run the commands as root so try again without using sudo and see if that helps.
This solves the problem npm install composer-connector-hlf

Resources