【发布时间】:2020-07-26 08:01:23
【问题描述】:
[完全错误]
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
/usr/bin/python: can't find '__main__' module in ''
[Finished in 0.1s with exit code 1]
[shell_cmd: python -u ""]
[dir: /Applications/Sublime Text.app/Contents/MacOS]
[path: /Library/Frameworks/Python.framework/Versions/3.8/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Frameworks/Mono.framework/Versions/Current/Commands]
我所做的只是打印('hello world!')
但不久前,我尝试安装/更新新版本的 python。 我正在尝试学习编码,不久前我做了一门课程,现在我注册了另一门课程,并希望拥有最新版本的 python。当我安装 python 3.8.2 时,我开始遇到问题。 甚至下载了我的第一个 IDE - pycharm 并且也有一些问题。但试图一次解决一个问题。 顺便说一下,使用 Mac OS!
【问题讨论】:
-
如果没有看到您正在使用的
sublime-build文件,很难说为什么会产生tput错误,因此包括在内可能会有所帮助。除此之外,您的 Python 错误是因为您在第一次尝试运行文件之前没有保存文件。 -
我在哪里可以找到你建议的 sublime-build ?如果这是一个愚蠢的问题,我很抱歉。我真的很新
-
-
在我的 ~/.bash_profile 我有 cd ~/Desktop PS1="$(tput setaf 2)[\w] \n $(tput setaf 196)$(tput sgr0)~: " # Setting PATH for Python 3.6 # 原始版本保存在 .bash_profile.pysave PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}" export PATH alias python=python3 # Setting PATH for Python 3.8 # 原始版本保存在.bash_profile.pysave PATH="/Library/Frameworks/Python.framework/Versions/3.8/bin:${PATH}" export PATH
标签: python python-3.x macos terminal sublimetext3