-
Notifications
You must be signed in to change notification settings - Fork 26
Description
After setting up the developer environment using pipenv.
When running fastoad notebooks
, the following error is returned:
"
Traceback (most recent call last):
File "/home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/bin/fastoad", line 6, in
from pkg_resources import load_entry_point
File "/home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/lib/python3.7/site-packages/pkg_resources/init.py", line 3252, in
@_call_aside
File "/home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/lib/python3.7/site-packages/pkg_resources/init.py", line 3236, in _call_aside
f(*args, **kwargs)
File "/home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/lib/python3.7/site-packages/pkg_resources/init.py", line 3265, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/lib/python3.7/site-packages/pkg_resources/init.py", line 584, in _build_master
ws.require(requires)
File "/home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/lib/python3.7/site-packages/pkg_resources/init.py", line 901, in require
needed = self.resolve(parse_requirements(requirements))
File "/home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/lib/python3.7/site-packages/pkg_resources/init.py", line 787, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pexpect; sys_platform != "win32"' distribution was not found and is required by ipython
"
Running jupyter lab
works. However, once opening a notebook the error returned is:
"
[W 10:21:44.519 LabApp] Notebook src/fastoad/notebooks/tutorial/01_tutorial.ipynb is not trusted
[I 10:21:45.397 LabApp] Kernel started: a52e9341-e923-4f34-9866-fe51a663a1ea
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/lib/python3.7/site-packages/ipykernel_launcher.py", line 15, in
from ipykernel import kernelapp as app
File "/home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/lib/python3.7/site-packages/ipykernel/init.py", line 2, in
from .connect import *
File "/home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/lib/python3.7/site-packages/ipykernel/connect.py", line 13, in
from IPython.core.profiledir import ProfileDir
File "/home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/lib/python3.7/site-packages/IPython/init.py", line 55, in
from .core.application import Application
File "/home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/lib/python3.7/site-packages/IPython/core/application.py", line 25, in
from IPython.core import release, crashhandler
File "/home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/lib/python3.7/site-packages/IPython/core/crashhandler.py", line 27, in
from IPython.core import ultratb
File "/home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/lib/python3.7/site-packages/IPython/core/ultratb.py", line 119, in
from IPython.utils import path as util_path
File "/home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/lib/python3.7/site-packages/IPython/utils/path.py", line 17, in
from IPython.utils.process import system
File "/home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/lib/python3.7/site-packages/IPython/utils/process.py", line 19, in
from ._process_posix import system, getoutput, arg_split, check_pid
File "/home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/lib/python3.7/site-packages/IPython/utils/_process_posix.py", line 23, in
import pexpect
ModuleNotFoundError: No module named 'pexpect'
"""
Running jupyter notebook
the terminal renders:
"""
(FAST-OAD) sdelbecq@scott-xps:~/PycharmProjects/FAST-OAD$ jupyter notebook
[W 10:26:38.743 NotebookApp] Terminals not available (error was No module named 'winpty')
[I 10:26:38.763 NotebookApp] JupyterLab extension loaded from /home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/lib/python3.7/site-packages/jupyterlab
[I 10:26:38.763 NotebookApp] JupyterLab application directory is /home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/share/jupyter/lab
[I 10:26:38.765 NotebookApp] Serving notebooks from local directory: /home/sdelbecq/PycharmProjects/FAST-OAD
[I 10:26:38.765 NotebookApp] The Jupyter Notebook is running at:
[I 10:26:38.765 NotebookApp] http://localhost:8888/?token=c55ff51999397eadb6bca865fba834a4f6342ac8dd8512ea
[I 10:26:38.765 NotebookApp] or http://127.0.0.1:8888/?token=c55ff51999397eadb6bca865fba834a4f6342ac8dd8512ea
[I 10:26:38.765 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 10:26:38.782 NotebookApp]
To access the notebook, open this file in a browser:
file:///home/sdelbecq/.local/share/jupyter/runtime/nbserver-28015-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=c55ff51999397eadb6bca865fba834a4f6342ac8dd8512ea
or http://127.0.0.1:8888/?token=c55ff51999397eadb6bca865fba834a4f6342ac8dd8512ea
[W 10:26:43.040 NotebookApp] 404 GET /api/kernels/865f91ef-1df4-4fc6-8afd-43f90d01ae2f/channels?session_id=b2b15ef60c0f4c27a3b1c1f3cb27dbf6 (127.0.0.1): Kernel does not exist: 865f91ef-1df4-4fc6-8afd-43f90d01ae2f
[W 10:26:43.047 NotebookApp] 404 GET /api/kernels/865f91ef-1df4-4fc6-8afd-43f90d01ae2f/channels?session_id=b2b15ef60c0f4c27a3b1c1f3cb27dbf6 (127.0.0.1) 12.31ms referer=None
[W 10:26:52.039 NotebookApp] Replacing stale connection: 865f91ef-1df4-4fc6-8afd-43f90d01ae2f:b2b15ef60c0f4c27a3b1c1f3cb27dbf6
"""
When opening a notebook the following error is return:
"""
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/lib/python3.7/site-packages/ipykernel_launcher.py", line 15, in
from ipykernel import kernelapp as app
File "/home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/lib/python3.7/site-packages/ipykernel/init.py", line 2, in
from .connect import *
File "/home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/lib/python3.7/site-packages/ipykernel/connect.py", line 13, in
from IPython.core.profiledir import ProfileDir
File "/home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/lib/python3.7/site-packages/IPython/init.py", line 55, in
from .core.application import Application
File "/home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/lib/python3.7/site-packages/IPython/core/application.py", line 25, in
from IPython.core import release, crashhandler
File "/home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/lib/python3.7/site-packages/IPython/core/crashhandler.py", line 27, in
from IPython.core import ultratb
File "/home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/lib/python3.7/site-packages/IPython/core/ultratb.py", line 119, in
from IPython.utils import path as util_path
File "/home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/lib/python3.7/site-packages/IPython/utils/path.py", line 17, in
from IPython.utils.process import system
File "/home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/lib/python3.7/site-packages/IPython/utils/process.py", line 19, in
from ._process_posix import system, getoutput, arg_split, check_pid
File "/home/sdelbecq/.local/share/virtualenvs/FAST-OAD-3a9hL4Al/lib/python3.7/site-packages/IPython/utils/_process_posix.py", line 23, in
import pexpect
ModuleNotFoundError: No module named 'pexpect'
"""
The module pexpect appears in the FAST-OAD pipenv packages (version 4.6.0 , the latest is 4.7.0).
Manually installing pexpect using pipenv install pexpect==4.6.0
solves the 3 above issues.