ImportError: No module named jupyter_core.command when running via SSH - jupyter-notebook

Jupyter notebook work just fine on my computer, but when i run it via ssh from another computer i receive this message:
ImportError: No module named jupyter_core.command
Im using Ubuntu 18.04.3 LTS for both of them
and i have Conda installed

Ok then.
I just installed Ipython outside of the environment i worked with.:
conda deactivate
and then:
sudo apt install ipython

This worked for me
sudo apt install python3-jupyter-core

Related

Creating a qt GUI in Noetic and issues with catkin_create_qt_pkg

I would like to create a QT GUI package in Noetic. Previously in kinetic/melodic, this could be done using the command 'catkin_create_qt_pkg ' but it's not working in Ubuntu 20.04 as I get
catkin_create_qt_pkg: command not found
Unfortunately, noetic appears to have removed the support for the qt-create and qt-build. Thus, I get 'Unable to locate package' when I try to install them using
sudo apt-get install ros-noetic-qt-build
sudo apt-get install ros-noetic-qt-create
how to create a qt-gui in ubuntu-20.04 with noetic?
System info
Ubuntu 20.04.2 LTS Kernel
5.10.0-1050-oem

I can't install lableImg Annotation tool in M1 Mac

While installing LabelImg in M1 Mac using below command
pip install pyqt5 lxml
This is the error I got
ERROR: pyqt5 from https://files.pythonhosted.org/packages/7c/5b/e760ec4f868cb77cee45b4554bf15d3fe6972176e89c4e3faac941213694/PyQt5-5.14.0.tar.gz#sha256=0145a6b7de15756366decb736c349a0cb510d706c83fda5b8cd9e0557bc1da72 has a pyproject.toml file that does not comply with PEP 518: 'build-system.requires' contains an invalid requirement: 'sip >=5.0.1 <6'
How to install lableImg annotation tool in M1 Mac?
I got it to work by using the following commands
brew install pyqt#5
pip install labelimg
And that's it, it just works
You just need to type labelimg in the Terminal and the app will start running
I don't know why they don't tell you this in the installation guide
Alrighty!
On MacOS Monterey, none of the other solutions posted here solved this problem for me. However, I managed to easily solve the issue, without a virtual environment or too much fiddling about like so:
Firstly, you have to download all labelImg packages from this link:
https://github.com/tzutalin/labelImg#macos
(You can download it as a .zip file or clone it)
Unzip and then in your terminal cd into whatever directory you downloaded the above files to.
Then run the following commands in order:
pyrcc5 -o libs/resources.py resources.qrc
Then,
pip3 install lxml
Finally,
python3 labelImg.py
It should run without an issue now.
You can go one of two ways:
Using brew:
You can use homebrew to install the dependencies - like qt and libxml2. This will let your package manager handle everything and generally should solve the problem with the . Then you can run
python3 labelimg.py
Using Virtual Environments:
This is the more recommended way to go about in such cases. You can use conda, pipenv or venv to create a virtual environment which is isolated from your system python installation. Then you can try to install it as explained in the README.rst in the root of the repository:
brew install python3
pip3 install pipenv
pipenv run pip install pyqt5==5.12.1 lxml
pipenv run make qt5py3
pipenv run python3 labelImg.py
[Optional] rm -rf build dist; python setup.py py2app -A;mv "dist/labelImg.app" /Applications
You can try the two methods and and get back with the errors if there are any.
This is my note.
I just succeed on my Mac M1 Chip
CHECK THIS OUT!
Installation of labelimg on mac m1 chip
my first reference
my second reference
First, you must use terminal with rosetta version
Then, you already have python3
Then...
[Done]
# check where python3 is
$ where python3
# create env
$ /usr/bin/python3 -m venv env
# check env is
$ where env
# activate env list
$ source env/bin/activate
# updated to the newest
$ pip install --upgrade pip
# installation of PyQt5
$ pip install PyQt5
# start to run labelImg.py
$ cd Documents/repos/labelImg
$ pip3 install pyqt5 lxml
$ make qt5py3
# [run ok!!]
$ python3 labelImg.py
Using Conda
Create a virtual environment in conda and activate it
conda create -n venv
conda activate venv
Install pyqt using conda
conda install pyqt
Install lxml using pip
pip install lxml
Change directory to the downloaded/cloned labelImg folder
cd path/to/labelImg/folder/
Make qt5py3
make qt5py3
Run LabelImg
python labelImg.py

Jupyter notebook issues -Anaconda3-2019.03-Windows-x86_64

jupyter notebook or jupyter-notebook
gives error --> Script file 'C:\ProgramData\Anaconda3\Scripts\jupyter-notebook-script.py' is not present.
Don't have \.jupyter folder in %users%
No shortcut in windows startup created.
machine details: Windows 10 - 64 bit
conda version --> 4.6.11
Python version -->3.7.3
jupyter version --> 4.4.0
pls help me resolve it.
It seems that you have not installed correctly yet how have you installed jupyter. Since you have anaconda try this first in your cmd.
conda install -c conda-forge jupyterlab
Then run jupyter notebook again in your cmd and see how it goes

Ubuntu 16.04 Python3.6 installation

I started using a computer at work that has Ubuntu 16.04 installed. Initially, Python3.6.8 was set as the version that was used if I entered the command 'python3' at the terminal. I updated Ubuntu using 'sudo apt-get update', installed miniconda and used the 'sudo apt-get autoremove' command. I followed the mini-tutorial on the anaconda website and one of the commands resulted in a warning about the pip version being old so I upgraded it inside a conda environment.
I noticed at some point that this error was occurring whenever I entered 'python3' at the commandline:
But as you can see, the default 3.5.2 version is there, but for some reason the 3.6.8 version doesn't seem to be there. These are the symlinks in /usr/bin and /etc/alternatives:
Is it safe for me to simply install Python3.6 using 'sudo apt-get install python3.6' and then the symlink will work correctly?
Thanks, any help appreciated.

jupyter not found after pip install jupyter

After many different ways of trying to install jupyter, it does not seem to install correctly.
May be MacOS related based on how many MacOS system python issues I've been having recently
pip install jupyter --user
Seems to install correctly
But then jupyter is not found
where jupyter
jupyter not found
Not found
Trying another install method found on SO
pip install --upgrade notebook
Seems to install correctly
jupyter is still not found
where pip /usr/local/bin/pip
What can I do to get the command line jupyter notebook command working as in the first step here: https://jupyter.readthedocs.io/en/latest/running.html#running
Short answer: Use python -m notebook
After updating to OS Catalina, I installed a brewed python: brew install python.
It symlinks the Python3, but not the python command, so I added to my $PATH variable the following:
/usr/local/opt/python/libexec/bin
to make the brew python the default python command (don't use system python, and now python2.7 is deprecated). python -m pip install jupyter works, and I can find the jupyter files in ~/Library/Python/3.7/bin/, but the tutorial command of jupyter notebook doesn't work. Instead I just run python -m notebook.
My MacOS has python 2.7, I installed python3 with brew, then the following commands work for me
brew install python3
brew link --overwrite python
pip3 install ipython
python3 -m pip install jupyter
You need to add the local python install directory to your path. Apparently this is not done by default on MacOS.
Try:
export PATH="$HOME/Library/Python/<version number>/bin:$PATH"
and/or add it to your ~/.bashrc.
Try solving this with Conda or Poetry.
Poetry makes it a lot easier to manage Python dependencies (including Jupyter) and build a virtual environment.
Here are the steps to adding Jupyter to a project:
Run poetry add pandas jupyter ipykernel to add the dependency
Run poetry shell to create a shell within the virtual environment
Run jupyter notebook to to fire up a notebook with access to all the virtual environment dependencies
The other suggested solutions are just band-aids. Conda / Poetry can give you a sustainable solution that's easy to maintain and will shield you from constant Python dependency hell.

Resources