Package directory does not exist. Help!

Hey guys, I’m creating a Python package called natedhaliwal [1] and I see the following error whenever I try to build the package with python sdist bdist_wheel, to make the essential dist/ directory:

running sdist
running egg_info
writing natedhaliwal.egg-info/PKG-INFO
writing dependency_links to natedhaliwal.egg-info/dependency_links.txt
writing requirements to natedhaliwal.egg-info/requires.txt
writing top-level names to natedhaliwal.egg-info/top_level.txt
error: package directory 'natedhaliwal_package' does not exist

Repl link/Link to where the bug appears:

Code for (where the command is to be run in):

from setuptools import setup

    description='A package that makes Python easier.',
    author='Nate Dhaliwal',

I need help as I want to publish this as quickly as I can.

Thanks guys!
P.S. ChatGPT has nothing left to say.

  1. Yes, very imaginatively named… ↩︎

tbh I recommend using poetry for building your projects. I’ll work one of my existing packages into a template.

Erm @Firepup650 using poetry build?

As well as poetry upload, I find it a lot easier to use than buildtools and twine.
I finished the template, here:

Ok… I’ll stick to my poetry commands.
I ran poetry publish --build, and it prompted:

There are 2 files ready for publishing. Build anyway? (yes/no)

I have no idea where these 2 files are from. Maybe something to do with my pyproject.toml?

name = "natedhaliwal-package"
version = "1.0.0"
description = "A simple package to help code Python easier."
authors = ["Nate Dhaliwal <>"]
include = ["", "pyproject.toml", ""]

python = "^3.6"
flask = "^3.0.0"
requests = "^2.31.0"
setuptools = "^68.2.2"
twine = "^4.0.2"

requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

It sounds like one of your previous commands succeeded in building the package, which would be where it’s finding the existing files to upload.

Also, you don’t need to include the pyproject.toml file in your pyproject.toml.

@Firepup650 Should I include

Pulling from my template, I don’t even use the include part:

name = "package"
version = "0.0.1"
authors = ["author <email>"]
description = "Description"
readme = ""
classifiers = [
    "Programming Language :: Python :: 3",
    "License :: OSI Approved :: MIT License",
    "Operating System :: OS Independent",
    "Development Status :: 5 - Production/Stable",
    "Environment :: Console",
    "Intended Audience :: Developers",
    "Natural Language :: English",
license = "MIT"
repository = ""
"Bug Tracker" = ""
Replit = ""

python = "^3.8"


requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

The relevant part about the README is here:

description = "Description"
readme = ""

If you’re uploading using poetry, you can remove these two dependencies.

@Firepup650 Ok thanks!
Gtg now, I’ll come back tomorrow and I’ll check on the Solutions.