vivekhsridhar/tracktor

Não consigo abrir jupyter notebook! Por favor me ajudem

KKaelly opened this issue · 2 comments

Hi, very new to open cv/coding (only have some experience in R). I have been following the online instructions and up tp now everything seems to be going great! But when I try to run the code 'jupyter notebook' in comes up with the following (which I have no idea what it means).
(ants) C:\Users\kelly>jupyter notebook
Traceback (most recent call last):
File "c:\users\kelly\miniconda3\envs\ants\lib\runpy.py", line 174, in run_module_as_main
"main", fname, loader, pkg_name)
File "c:\users\kelly\miniconda3\envs\ants\lib\runpy.py", line 72, in run_code
exec code in run_globals
File "C:\Users\kelly\Miniconda3\envs\ants\Scripts\jupyter-notebook.EXE_main
.py", line 5, in
File "c:\users\kelly\miniconda3\envs\ants\lib\site-packages\notebook_init
.py", line 25, in
from .nbextensions import install_nbextension
File "c:\users\kelly\miniconda3\envs\ants\lib\site-packages\notebook\nbextensions.py", line 31, in
from .config_manager import BaseJSONConfigManager
File "c:\users\kelly\miniconda3\envs\ants\lib\site-packages\notebook\config_manager.py", line 15, in
from traitlets.config import LoggingConfigurable
File "c:\users\kelly\miniconda3\envs\ants\lib\site-packages\traitlets_init_.py", line 1, in
from .traitlets import *
File "c:\users\kelly\miniconda3\envs\ants\lib\site-packages\traitlets\traitlets.py", line 49, in
import enum
ImportError: No module named enum

(ants) C:\Users\kelly> pip install jupyter notebook
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Requirement already satisfied: jupyter in c:\users\kelly\miniconda3\envs\ants\lib\site-packages (1.0.0)
Requirement already satisfied: notebook in c:\users\kelly\miniconda3\envs\ants\lib\site-packages (5.7.6)
Requirement already satisfied: ipywidgets in c:\users\kelly\miniconda3\envs\ants\lib\site-packages (from jupyter) (7.4.2)
Requirement already satisfied: qtconsole in c:\users\kelly\miniconda3\envs\ants\lib\site-packages (from jupyter) (4.4.3)
Requirement already satisfied: nbconvert in c:\users\kelly\miniconda3\envs\ants\lib\site-packages (from jupyter) (5.4.1)
Requirement already satisfied: jupyter-console in c:\users\kelly\miniconda3\envs\ants\lib\site-packages (from jupyter) (6.0.0)
jupyter-console requires Python '>=3.5' but the running Python is 2.7.15

(ants) C:\Users\kelly>jupyter notbook
Error executing Jupyter command 'notbook': [Errno 'jupyter-notbook' not found] 2

(ants) C:\Users\kelly>jupyter notebook
Traceback (most recent call last):
File "c:\users\kelly\miniconda3\envs\ants\lib\runpy.py", line 174, in run_module_as_main
"main", fname, loader, pkg_name)
File "c:\users\kelly\miniconda3\envs\ants\lib\runpy.py", line 72, in run_code
exec code in run_globals
File "C:\Users\kelly\Miniconda3\envs\ants\Scripts\jupyter-notebook.EXE_main
.py", line 5, in
File "c:\users\kelly\miniconda3\envs\ants\lib\site-packages\notebook_init
.py", line 25, in
from .nbextensions import install_nbextension
File "c:\users\kelly\miniconda3\envs\ants\lib\site-packages\notebook\nbextensions.py", line 31, in
from .config_manager import BaseJSONConfigManager
File "c:\users\kelly\miniconda3\envs\ants\lib\site-packages\notebook\config_manager.py", line 15, in
from traitlets.config import LoggingConfigurable
File "c:\users\kelly\miniconda3\envs\ants\lib\site-packages\traitlets_init_.py", line 1, in
from .traitlets import *
File "c:\users\kelly\miniconda3\envs\ants\lib\site-packages\traitlets\traitlets.py", line 49, in
import enum
ImportError: No module named enum

(ants) C:\Users\kelly>jupyter notebook --notebook-dir C:\Users\kelly\Documents\FCA - Unesp\TRACKTOR_Análise de comportamento\tracktor-master\tracktor-master\examples
Traceback (most recent call last):
File "c:\users\kelly\miniconda3\envs\ants\lib\runpy.py", line 174, in run_module_as_main
"main", fname, loader, pkg_name)
File "c:\users\kelly\miniconda3\envs\ants\lib\runpy.py", line 72, in run_code
exec code in run_globals
File "C:\Users\kelly\Miniconda3\envs\ants\Scripts\jupyter-notebook.EXE_main
.py", line 5, in
File "c:\users\kelly\miniconda3\envs\ants\lib\site-packages\notebook_init
.py", line 25, in
from .nbextensions import install_nbextension
File "c:\users\kelly\miniconda3\envs\ants\lib\site-packages\notebook\nbextensions.py", line 31, in
from .config_manager import BaseJSONConfigManager
File "c:\users\kelly\miniconda3\envs\ants\lib\site-packages\notebook\config_manager.py", line 15, in
from traitlets.config import LoggingConfigurable
File "c:\users\kelly\miniconda3\envs\ants\lib\site-packages\traitlets_init_.py", line 1, in
from .traitlets import *
File "c:\users\kelly\miniconda3\envs\ants\lib\site-packages\traitlets\traitlets.py", line 49, in
import enum
ImportError: No module named enum

It appears that you haven't managed installing jupyter with python 3.x successfully. I'd recommend talking to a local IT person to get the installation right.

Hope this helps.

Cheers!
Vivek

I had the same issue. The problem is that by running
conda install -c menpo opencv3
you install opencv for python 2.7. This will downgrade your python version and jupyter notebook will not function anymore:

jupyter-console requires Python '>=3.5' but the running Python is 2.7.15

It should work if you install opencv for python 3.x. Re-do all the steps from the beginning (create new environment etc.) but type
conda install opencv
to install opencv for python 3.

It seems to work for me (just tried the example videos) and I hope it works for you, too.