Python setuptools: package directory does not exist Python setuptools: package directory does not exist python-3.x python-3.x

Python setuptools: package directory does not exist


find_packages() automatically generates package names. That is, in your case all it does is generate ['my_pkg']. It doesn't actually tell setup() where to find my_pkg, just that it should expect to find a package called my_pkg somewhere. You have to separately tell setup() where it should look for packages. Is this confusing and counter intuitive? Yes. Anyway, you can tell setup() where to find my_pkg by using the package_dir argument. eg.

package_dir={"":"src"}