1

I am sure this used to work a few days ago and I don't think I have changed anything, in fact I just uninstalled anaconda and vscode and reinstalled it all to see if that worked but did not help.

But the terminal only prints at the end never as the code runs

eg if I run this

import time

while True:
    time.sleep(.5)
    print('true')

nothing happens.

If I run this

import time

time.sleep(.5)
print('true')
time.sleep(.5)
print('true')
time.sleep(.5)
print('true')

Nothing is printed for 1.5 seconds then it all comes at one go

if I highlight the code and shift-return it runs as expected in the side bar Jupyter Server thing. I am lost

anyway thanks for any help you can give!

OK sorry I just noticed something else

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.   
Try the new cross-platform PowerShell https://aka.ms/pscore6

. : File C:\Users\Jasper\Documents\WindowsPowerShell\profile.ps1 cannot b
information, see about_Execution_Policies at https:/go.microsoft.com/fwli
At line:1 char:3
+ . 'C:\Users\Jasper\Documents\WindowsPowerShell\profile.ps1'
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess
+ conda activate base
+ ~~~~~
    + CategoryInfo          : ObjectNotFound: (conda:String) [], CommandNotFoundExceptioneption
    + FullyQualifiedErrorId : CommandNotFoundException

this is printed out when I run anything. I am not sure if it was there before, it seems like something is not correct, but not sure what.

3
  • Can you show how are you running this code? Commented Jan 13, 2020 at 14:01
  • I am clicking on the little green arrow symbol on the top right of the window that says "run python in terminal" Commented Jan 13, 2020 at 14:05
  • Sorry, I am using VS on Linux, I use terminal directly. Can you see the blank terminal? Commented Jan 13, 2020 at 15:08

1 Answer 1

1

This was an issue due to the use of conda run in the Python extension. This has been reverted in the latest point release so things should work now.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.