我删除了Anaconda目录,因为我没有使用它,现在在终端中,当我输入python3时,我得到了-bash: //anaconda/bin/python3: No such file or directory。
我安装了python3.6,这显示了我输入which python3时的情况。我真的很想知道如何纠正这个问题,这样我才能再次访问终端中的python3?
我刚开始学习Python。我正在使用MU编辑器,我无法通过第一个"if语句“。我点击run,然后输入"Joe“,它一直问我”你是谁?“
在运行部分输入此输入正确吗?或者应该放在REPL或文本编辑器部分?
while True:
print('Who are you?')
name = input()
if name != 'Joe':
continue
print('Hello, Joe. What is the password? (It is a fish.)')
password = inpu
因此,我安装了大量的Python版本,只想通过将python输入终端就可以访问Python3.3。我读过其他文章,但不管出于什么原因,在我的机器上,我输入python时它会打开Python2.7,即使我在bash配置文件中更改了别名。
作为参考,我的bash配置文件有一行:
alias python='python3'
在windows终端中,只需键入:python3 program.py<input_file.txt即可使用文本输入文件运行程序。我是Linux的新手,我已经尝试过了,我得到了错误:
File "<string>", line 1, in <module>
对于为什么它将我的输入文件作为字符串读取,有什么建议吗?任何帮助都将不胜感激!
当我输入'py‘时,我得到以下内容:
Python 3.10.0 (tags/v3.10.0:b494f59, Oct 4 2021, 19:00:18) [MSC v.1929 64 bit (AMD64)] on win32
输入“帮助”、“版权”、“信用”或“许可”以获取更多信息。
但是当我想要。
poetry install
我得到:
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings &g
当我输入"python“时,我希望得到一个简单的http.server服务器,而不是:
$ python http.server
python: can't open file 'http.server': [Errno 2] No such file or directory
在我的服务器上,还有一个Arch盒(已经运行了一段时间了,所以不清楚安装了哪些包)这个命令确实运行了webserver。
我遗漏了什么?
编辑:是的,当然是"-m",我很抱歉浪费了时间,但是感谢您的帮助。