'Using package entry points with pyproject.toml based editable installs

My entry points are setup like this

[options]
package_dir =
    = package
packages = .
python_requires = >=3.6

[option.entry_points]
console_scripts =
    cons = scripts.cons

gui_scripts =
    gui = scripts.gui

I installed the package in editable mode with pip install -e .. I can import package through a Python REPL, but running cons or gui (these are not the real names) doesn't work. I found that the entry point scripts are indeed not placed in %LOCALAPPDATA%\Programs\Python\Python39\Scripts but %LOCALAPPDATA%\Programs\Python\Python39\Lib\site-packages\package.egg-link does exist



Solution 1:[1]

This is because you installed the package in editable mode, and then tried to run it from the CLI. To use the command from the CLI, you may NOT install it in editable mode. Instead just use:

pip install .

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dan Ciborowski - MSFT