0

I am trying to create a new project, but I get this error:

Error: Command '['C:\Users\Rosca\PycharmProjects\Mark\venv\Scripts\python.exe', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

RV Gamer
  • 9
  • 1
  • Have you tried upgrading pip? python -m pip install --upgrade pip – SequenceToSequence Apr 10 '21 at 11:27
  • @SequenceToSequence E:\Python 3.6.0\python.exe: No module named pip – RV Gamer Apr 10 '21 at 11:41
  • It seems like you might have a problem with your python install. Is python correctly added to your PATH environment variable? – SequenceToSequence Apr 10 '21 at 11:47
  • @SequenceToSequence So I have reinstalled python with PATH but it seems like it gives me this error when I try to install a package: 'pip' is not recognized as an internal or external command, operable program or batch file. – RV Gamer Apr 10 '21 at 11:57
  • Welcome to Stack Overflow. The error you are getting that `pip` can't be found (after a fresh Python install) is a clear sign you didn't add it to your Operating System's environment variables, see [How do I add Python to the Windows PATH?](https://superuser.com/a/143121) also in the [official Python documentation](https://docs.python.org/3/using/windows.html#excursus-setting-environment-variables) afterwards don't forget to [configure the interpreter inside the IDE](https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html) – bad_coder Apr 10 '21 at 12:50
  • Besides the error message as present is somewhat strange since you don't include further details of how your OS and IDE are configured. Apparently you are trying to create a new project using a venv, but there are insufficient details to elaborate further. – bad_coder Apr 10 '21 at 12:53
  • @bad_coder So I configured the IDE and it shows me to install packaging tool, but when I press it it tells me this: OSError: [Errno 9] Bad file descriptor – RV Gamer Apr 11 '21 at 09:57
  • @RVGamer currently SO [only has1 post](https://stackoverflow.com/search?q=%5Bpycharm%5D+OSError%3A+Bad+file+descriptor+) for this error on the PyCharm tag with some experienced members saying it might be a bug and you should use `pip` on the command line instead of the GUI. Here's [another explanation of the error](https://stackoverflow.com/a/7686464). Anyway, you question should be edited to include lots of details, at this point readers don't have a description of your environment nor a screenshot so there's nothing more to go on. – bad_coder Apr 11 '21 at 12:24

0 Answers0