Sign Up

Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have a permission to ask a question, You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here
Sign InSign Up

ErrorCorner

ErrorCorner Logo ErrorCorner Logo

ErrorCorner Navigation

  • Home
  • Contact Us
  • About Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Contact Us
  • About Us
Home/ Questions/Q 215
Next
Answered
Kenil Vasani
Kenil Vasani

Kenil Vasani

  • 646 Questions
  • 567 Answers
  • 77 Best Answers
  • 26 Points
View Profile
  • 0
Kenil Vasani
Asked: December 8, 20202020-12-08T03:27:48+00:00 2020-12-08T03:27:48+00:00In: Python

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

  • 0

I’m doing a fresh install on a new Windows 10 laptop. I installed Python 3.9 and PyCharm Community 2020.2, then started a new project. In the project settings, I created a new project interpreter in a venv, inside the /venv folder. 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-dir

When I go to the Terminal and just ‘pip install pandas’ per PyCharm’s ‘proposed solution’, it installs fine, and pandas and its dependencies appear as usual in the list of installed modules in the interpreter. I’ve not encountered this before, and don’t see anywhere in the settings where I can specify how exactly PyCharm will invoke pip in this situation.

pippycharmpythonpython-venv
  • 1 1 Answer
  • 5 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook

    1 Answer

    • Voted
    1. Kenil Vasani

      Kenil Vasani

      • 646 Questions
      • 567 Answers
      • 77 Best Answers
      • 26 Points
      View Profile
      Best Answer
      Kenil Vasani
      2020-12-08T03:27:58+00:00Added an answer on December 8, 2020 at 3:27 am

      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.

      • 0
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp

    You must login to add an answer.

    Forgot Password?

    Sidebar

    Ask A Question
    • Popular
    • Kenil Vasani

      SyntaxError: invalid syntax to repo init in the AOSP code

      • 5 Answers
    • Kenil Vasani

      xlrd.biffh.XLRDError: Excel xlsx file; not supported

      • 3 Answers
    • Kenil Vasani

      Homebrew fails on MacOS Big Sur

      • 3 Answers
    • Kenil Vasani

      runtimeError: package fails to pass a sanity check for numpy ...

      • 3 Answers
    • Kenil Vasani

      Unable to resolve dependency tree error when installing npm packages

      • 2 Answers

    Explore

    • Most Answered
    • Most Visited
    • Most Voted
    • Random

    © 2020-2021 ErrorCorner. All Rights Reserved
    by ErrorCorner.com