I tried to change both the project name, which was energy-monitor
, and the package name (energymonitor
) to be the same and I set both to energy_monitor
, but nothing changes…but if I open the python shell in the same folder as the project I can import the energy_monitor
package with no errors, as soon as I change folder it doesn’t find the package anymore. It looks like it didn’t install the package system wide, but I thought that pipx should handle these kind of things.
Unfortunatly I’m not using any virtual environments, the packages are installed system-wide and I checked that the python version where the package is installed matched the one used by jupyter. Also, installing from jupyter didn’t work either :/
Yeah sorry I expressed myself wrongly, I mean that it looked like pipx didn’t install the package in the dedicated venv, and that was actually the case because I didn’t specify which packages to install in the pyproject.toml file apparently. I substituted these lines:
[tool.setuptools.packages.find] where = ["energymonitor"] [tool.setuptools.package-data] data = ["data/*"]
with these lines:
[tool.setuptools] packages = ["energymonitor"] include-package-data = true
and it worked!