Fixing PyCharm error : no such option: –build-dir

PyCharm error : no such option: –build-dir is an error which happens when you have a faulty installation of pip or PyCharm.

In this article I am going to explain what happens when you get this error and how you can solve it with a main solution, we will also explore other solutions which can possibly solve the issue.

Explaining the PyCharm error : no such option: –build-dir

This is a python error which happens when you have a faulty installation of pip or PyCharm.

The error message should look like the error in the example bellow, make sure you have the same error message in order to avoid confusion.

                                                                       #
no such option: --build-dir
                                                                       #

Bellow I make my best attempt at solving the error and present the best possible solution.

Solution : Downgrade pip or Fix PyCharm

Some versions of pip have dropped support for –build-dir which is used by PyCharm in order to install dependencies and packages.

There are two options, the first one is to use this fix released by the team behind PyCharm. https://youtrack.jetbrains.com/issue/PY-45712

The second option is to take matters into your own hands and solve this yourself.

First, you should close PyCharm and then run the command bellow.

                                                                       #
python -m pip install pip==m.m.m
                                                                       #

The command above will downgrade pip to version m.m.m which should be a previous version that you must chose yourself.

For more about pip and pip versions check out this page https://pip.pypa.io/en/stable/

The problem should be gone after following these steps.

If you have an issue, please make sure your python virtual environment is activated.

Summing-up

This is the end of the article, the error could be confusing but with a little bit of investigating the error could be solved, thanks for reading our post and good luck with the scripts to come.

If you want to support us consider donating to our Kofi account using the red button on top of this page. Keep coding, keep learning Python and cheers.

If you want to learn more about Python, please check out the Python Documentation : https://docs.python.org/3/