1

After creating a new Python project in IntelliJ:

Choosing venv and basic python3.6 interepreter, no inheriting of packages

There shouldn't be any requirements/additional packages.

I check this:

Enter image description here

So, to recap: I create a new project, select VENV, choose a new environment, and do not want inherit any requirements.

When I create an empty Python file, I get this:

Enter image description here

Where is this coming from? I don't see any requirements file, etc. But it must be somewhere.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Leviathan
  • 644
  • 1
  • 15
  • 30

1 Answers1

1

VirtualEnv copies PIP and SetupTools, in case you want to install new packages in the virtual environment (which is the main reason for VirtualEnv's existence).

So, the only way that I see (if you don't want them), is to create the new virtual environment from command line, and then "import" it in PyCharm.

Regarding the 2nd dilemma, it (might not be your case, but) sounds like an PyCharm caching problem. In [JetBrains.IntelliJ-Support]: Package requirements not satisfied (though they are), Sergey Karpov states:

Please try to remove this interpreter from IDE, then do File | Invalidate Caches/Restart.. | Invalidate and Restart and add the interpreter again.



Edit #0

I made a confusion: I talked about VirtualEnv, when in fact it's [Python 3.Docs]: venv - Creation of virtual environment that' being used. Nevertheless, this doesn't change much, the problem still persists, but only the --without-pip options is present.

Regarding the other problem, as I specified in a comment, I tried reproducing the behavior on my laptop, but I couldn't.

Community
  • 1
  • 1
CristiFati
  • 38,250
  • 9
  • 50
  • 87
  • 2nd dilemma wasnt due to this, I already tried it. and the first one is very..unsatisfying. but if that is the case and there aren't any other responses, ill take this as best answer - thank you – Leviathan Nov 19 '19 at 13:10
  • Regarding the 1st problem this is how things are at the current point, there's nothing you can do (maybe submit an enhancement request to add those options in the *GUI*). Now regarding the 2nd one: the problem didn;t go away after invalidating caches. Is there something that doesn't work? Are you able to run your file (might want to add a dummy *print* to see some output in the console). Also are you able to debug it? – CristiFati Nov 19 '19 at 13:28
  • I followed your steps, but I couldn't reproduce the behavior. Probably there's something messed up in your environment. Removing the *.idea* dir and try again. – CristiFati Nov 20 '19 at 02:45
  • im on a different project at work atm, so ill come back to this when I find the time..thank you for your input! – Leviathan Nov 21 '19 at 08:45
  • You're welcome!. Did you try deleting the dir (and thus recreating the project)? – CristiFati Nov 21 '19 at 09:06