【发布时间】:2021-12-14 17:02:15
【问题描述】:
我正在尝试在 Visual Studio Code 的 .py 文件中运行一个简单的命令,即:
import os
我在终端得到以下返回:
& : The term 'C:/Users/Tim-S/anaconda3/envs/plotlyenv/python.exe' is not recognized as
the name of a cmdlet, function, script file, or operable program. Check the spelling of
the name
, or if a path was included, verify that the path is correct and try again.
At line:1 char:3
+ & C:/Users/Tim-S/anaconda3/envs/plotlyenv/python.exe "c:/Users/Tim-S/ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:/Users/Tim-S/...yenv/python.exe:String)
[], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
谁能解释我如何解决这个问题?
【问题讨论】:
-
看起来python没有安装或不在路径上。
-
Windows 找不到
C:/Users/Tim-S/anaconda3/envs/plotlyenv/python.exe,这似乎是它试图用来运行您的代码的东西。 -
好的,那我应该把它改成什么?或者说安装它的正常路径是什么?
标签: python