-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jupyter dependency not properly installing with pipenv on Linux #91
Comments
The setup.cfg and Piplock.lock have been updated.
The problem is solved by running |
I have been testing things to find a generic solution:
Therefore, the easiest, but not optimal, way to maintain the PipFile.lock would be to add the pexpect dependency in the setup.cfg and generate the file on Windows. The less easy, and less optimal but totally generic, would be to add also the colorama dependency and generate the PipFile.lock on either Windows or Linux. What is your feeling on this @christophe-david? |
What do you do exactly when you talk about "generating On my side, keeping the |
I did However, if we follow the Wiki and run Traceback (most recent call last): I see three solutions:
I would suggest combining solution 1 and 2. Thus, updating the Wiki and also updating the PipFile.lock on the repository so it is compatible by default with Windows and Linux. |
The Wiki part about pipenv only deals with the way to add high-level packages (which could indeed be said more clearly). It also does not aim to be a full pipenv course and provides a link to the full documentation. But feel free to amend it to have this particular case covered :) About your solutions:
To conclude, there is a need to modify automated tests in GitHub actions to have Linux tested (and maybe macOS). This will help seeing OS-related problems. |
To keep track of what we discussed live: once correctly tested, |
I just realized there is a 4th solution, or a "3bis" that consists in adding colorama and pexpect in the I would accept it more easily than the setup.cfg, because it would just affect our development environment without impacting the packaging process, that rely only on setup.cfg. But the real solution is probably to give up on pipenv, that looks half-dead (no release since end of 2018) and go for Poetry, that looks well alive and natively able to handle multiple platforms. But it looks like it would need the adoption of pyproject.toml instead of setuptools, which will require some work. |
Just tried using Poetry. The Packaging looks easy from Poetry. I'll test it. The only drawback is that Sphinx and Pytest still cannot be piloted from a Stay tuned... |
pipenv files have been removed Solves #91
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]
[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.The text was updated successfully, but these errors were encountered: