I am trying to run the following simple python script called 'main.py', through a pipenv virtualenv:
print("started.")
Executing pipenv run ./main.py --verbose (in pipenv venv) does not print anything to the console.
Through VS code, running pipenv run ./main.py --verbose outputs the following:

That is to say, the python file seemingly does not run, expected 'started.' to be printed to the console, recieved nothing printed and program terminating.
This behaviour is also present when I attempt to run it through cmd, note the error produced with the --verbose flag:

I can run it sucessfully through just using python, however I really want to use pipenv to manage packages ect. I guess I'm mostly just curious at to:
- Why does this error occur?
- What does the following error, caused by running it with
--verboseflag, mean?
[5772:0107/202720.999:ERROR:broker_win.cc(56)] Error reading broker pipe: The pipe has been ended. (0x6D) - How do I fix the issue?
I have reinstalled Pyhton, pipenv, and vscode - but have recieved the same results. Running the 'pipenv run' command both within the shell and outside the shell have the same results.
EDIT:
A Visual Studio Code issue
In the post above, after runing pipenv run main.py, vscode would always open. Whats stranger is, once vscode is uninstalled, the command works as expected! So an additional question of mine is,
- Why does vscode make this issue happen/what's the fix for being able to code using vscode and running
pipenv run?
see bellow for what occurs when running pipenv run main.py with vscode initally closed:

This screenshot is after ~5mins of no action in iether the vscode console or the cmd console. The program never exited, and closeing the cmd also closed vscode.
pipenv runcommand is not supposed to be run in apipenv shell. Why are you doing that?pipenv shellsince thepipenv runon its own was causing the same issue, and I assumed that could be a fix. Will update the post, thank you.pipenv run python main.py, as I commented on MingJie's answer.