简体   繁体   中英

Visual Studio Code - No such file or directory

I have a problem with Visual Studio Code. I want to code with Python. I have installed the newest version of Python. I have installed Python extension on Visual Studio Code. I create file with .py extension (sample.py) and write first line of code to se if it's working.

so I write:

print("lalalalala")

and the result in terminal was:

Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\\Users\\Michał\\Desktop\\Python> & D:/Python/python.exe c:/Users/Micha/Desktop/Python/sample.py D:\\Python\\python.exe: can't open file 'c:/Users/Micha/Desktop/Python/sample.py': [Errno 2] No such file or directory PS C:\\Users\\Michał\\Desktop\\Python>

How can I fix it?

您必须安装python并使用扩展名.py写入文件名

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM