0

I am unable to add an interpretor in pycharm . I have searched many forums but unable to solve .

Error:Command

'['C:\\Users\\USER NAME \\PycharmProjects\\pythonProject\\venv\\Scripts\\python.exe', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 101.

I have python Python 3.7.8 in Windows 10 installed.

Screenshot

derpirscher
  • 14,418
  • 3
  • 18
  • 35
  • Possible [solution](https://stackoverflow.com/questions/61641280/python3-8-venv-returned-exit-status-101/62207756#62207756) –  Oct 05 '20 at 08:14
  • Hi, i cannot try this since the option is disabled and i tried to run as admin but it still does not enable – user2639287 Oct 05 '20 at 08:31
  • please refer this [link](https://stackoverflow.com/questions/61371606/returned-non-zero-exit-status-101-giving-an-error-when-i-tried-create-a-virtual) may be useful – gowridev Oct 05 '20 at 13:49
  • Is the venv exist and valid? Try running the command in the terminal, does it work? P.S. try to contact PyCharm's support pycharm-support@jetbrains.com and send them `idea.log` from **Help | Show Log in ...**. – Pavel Karateev Oct 05 '20 at 18:31
  • 1
    Thanks @gowridev and Neo it has got resolved .I have used python 3.6.5 and then used the option to install for all users manually and by not clicking the option usually displayed at the home screen of the installer – user2639287 Oct 05 '20 at 21:46

2 Answers2

0

You can try by going in the Pycharm UI. File-> Settings->Project Interpreter and Click the wheel sign and you can add the interpreter.

Simplecode
  • 559
  • 7
  • 19
  • hi simplecode and @NeoNØVÅ7 I have tried both things . Installed Python 3.8.0 which gave me the ability to install for all user options as well as tried clicking on the wheel sign as suggested by this comment but it does not work and I am stuck at the same error. – user2639287 Oct 05 '20 at 09:42
0

Do you have a space in the path to your original python.exe? Most likely hidden as "USER NAME"? If so, look in "C:\Users" directory for a text file "USER" (being the first part of your account, without any extension). Delete this file and it'll likely to work again.

The same error happens with venv in Windows. See This Q&A for more details.

kesh
  • 4,515
  • 2
  • 12
  • 20