PyCharm venv failed: ‘no such option: –build-dir’

Hello Guys How Are You All ? Hope You All Are Fine. Last Day I Have Faced PyCharm venv failed: ‘no such option: –build-dir’ Error in Python. Then I Have Found Solution For This. Lets Solve This Error Without Wasting Your Time.

How PyCharm venv failed: ‘no such option: –build-dir’ This Error Occurs ?

When I installed Python 3.9 and PyCharm Community 2020.2, then started a new project. Everything looks to get set up correctly, but I can’t install anything to the project interpreter. When I try to do so, e.g. when I try to install pandas or anything else, I get None-zero exit code (2) with the following message:

Usage: D:\MyProject\project\venv\Scripts\python.exe -m pip install [options] [package-index-options] ...
D:\MyProject\project\venv\Scripts\python.exe -m pip install [options] -r [package-index-options] ...
D:\MyProject\project\venv\Scripts\python.exe -m pip install [options] [-e] ...
D:\MyProject\project\venv\Scripts\python.exe -m pip install [options] [-e] ...
D:\MyProject\project\venv\Scripts\python.exe -m pip install [options] <archive url/path> ...
no such option: --build-di

How To Solve PyCharm venv failed: ‘no such option: –build-dir’ Error

PyCharm relies on --build-dir to install packages and the flag was removed in the latest pip 20.3.

The fix for PyCharm is ready and will be released this week in 2020.3 release (and backported to 2020.2.5 and 2020.1.5).

The workaround is to downgrade pip to the previous version – close PyCharm and run python -m pip install pip==20.2.4 in the terminal using the corresponding virtual environment.

Summery

So it’s all About this issue. Hope SyntaxError: invalid syntax to repo init in the AOSP code above all solution helped you a lot. Comment below Your thoughts and your queries. And Also Comment on your suggestion here.

Also Read

Leave a Comment