# Should I run `python setup.py`?


No. Commands like `python setup.py sdist`, `python setup.py bdist_wheel`, and `python
setup.py install` are deprecated.


Instead to build a [wheel](https://pydevtools.com/handbook/reference/wheel.md) or [sdist](https://pydevtools.com/handbook/reference/sdist.md), use `python -m build` ([build](https://pydevtools.com/handbook/reference/build.md)):

```console
pip install build

python -m build  # builds both sdist and wheel
python -m build --sdist
python -m build --wheel
```

To install a package, use `pip install`:

```console
pip install .  # replacement for python setup.py install
pip install --editable .  # replacement for python setup.py develop
```

## Learn More
* [Running `setuptools`
commands](https://setuptools.pypa.io/en/latest/deprecated/commands.html#running-setuptools-commands)
* [Why you shouldn't invoke setup.py
  directly](https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html)
