Command-line entry points are not created when installing Jupyter
See original GitHub issue- I am on the latest Poetry version.
- I have searched the issues of this repo and believe that this is not a duplicate.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).
- OS version and name: macOS 10.13.5
- Poetry version: 0.11.2
- Link of a Gist with the contents of your pyproject.toml file: N/A
Issue
I assume that Jupyter might be doing something strange with their “meta” installer, but I think this should still work with Poetry:
$ poetry new .
Created package jupyter-test in .
$ poetry add jupyter
Creating virtualenv jupyter-test-py3.6 in /private/tmp/jupyter-test/.venv
Using version ^1.0 for jupyter
Updating dependencies
Resolving dependencies... (0.3s)
Package operations: 8 installs, 0 updates, 0 removals
Writing lock file
- Installing six (1.11.0)
- Installing atomicwrites (1.1.5)
- Installing attrs (18.1.0)
- Installing more-itertools (4.2.0)
- Installing pluggy (0.6.0)
- Installing py (1.5.4)
- Installing jupyter (1.0.0)
- Installing pytest (3.6.3)
$ poetry run jupyter notebook --version
[FileNotFoundError]
[Errno 2] No such file or directory: 'jupyter': 'jupyter'
run <args> (<args>)...
But if I use pip
instead:
$ .venv/bin/pip install jupyter
Requirement already satisfied: jupyter in ./.venv/lib/python3.6/site-packages
Collecting notebook (from jupyter)
...
Successfully installed MarkupSafe-1.0 Send2Trash-1.5.0 appnope-0.1.0 backcall-0.1.0 bleach-2.1.3 decorator-4.3.0 entrypoints-0.2.3 html5lib-1.0.1 ipykernel-4.8.2 ipython-6.4.0 ipython-genutils-0.2.0 ipywidgets-7.2.1 jedi-0.12.1 jinja2-2.10 jsonschema-2.6.0 jupyter-client-5.2.3 jupyter-console-5.2.0 jupyter-core-4.4.0 mistune-0.8.3 nbconvert-5.3.1 nbformat-4.4.0 notebook-5.5.0 pandocfilters-1.4.2 parso-0.3.1 pexpect-4.6.0 pickleshare-0.7.4 prompt-toolkit-1.0.15 ptyprocess-0.6.0 pygments-2.2.0 python-dateutil-2.7.3 pyzmq-17.0.0 qtconsole-4.3.1 simplegeneric-0.8.1 terminado-0.8.1 testpath-0.3.1 tornado-5.1 traitlets-4.3.2 wcwidth-0.1.7 webencodings-0.5.1 widgetsnbextension-3.2.1
$ poetry run jupyter notebook --version
5.5.0
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:12 (11 by maintainers)
Top Results From Across the Web
Getting Python Entry Point Not Found when trying to launch ...
I am using conda 4.7.12 with Python 3.7.4 on Windows 7. Interestingly enough the Jupyter Notebook will still launch and I can use...
Read more >What to do when things go wrong - The Jupyter Notebook
If you're using a menu shortcut or Anaconda launcher to start it, try opening a terminal or command prompt and running the command...
Read more >Entry points specification - Python Packaging User Guide
Entry points are a mechanism for an installed distribution to advertise components it ... it will create a command-line wrapper for each entry...
Read more >Entry Points - setuptools 65.6.3.post20221220 documentation
Entry points are a type of metadata that can be exposed by packages on installation. ... which allows you to run commands like...
Read more >How to Install entrypoints in Python? - Finxter
How to Install entrypoints on Windows? ... Type "cmd" in the search bar and hit Enter to open the command line. ... The...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Poetry does multiple checks to get the dependencies of a package:
requires_dist
field. If it’s non-empty it uses this information and doesn’t go further.wheel
or ansdist
and inspect them.*.dist-info/METADATA
file for information.**/*.egg-info/requires.txt
file for information.setup.py
file but it was a decision made at the start of the project to not do it, for security reasons and also to enforce good practices in packaging.Now, for this particular case, Poetry chooses the sdist, which doesn’t hold the dependency information, and not the wheel, which has the appropriate information, because the wheel has been declared has compatible only with Python 3.4.
That being said, I think we could do something similar as to what is currently done when using private repositories, i.e. if after using the compatible distributions without success we select wheels that are not necessarily compatible. I think it will work most of the time since wheels hold this information regardless of its specified Python version.
@jacebrowning Oh, this is a cache problem. You need to clear the jupyter-1.0.0 cache:
It should work after this.