我开始使用 bitbucket CI 制作应用程序,我正在使用以下步骤来部署应用程序,但安装 pip 的步骤失败了。
script:
- apt-get update
- apt-get install -y python-dev
- curl -O https://bootstrap.pypa.io/get-pip.py
- python get-pip.py
... and a few more steps
Run Code Online (Sandbox Code Playgroud)
不知道为什么,但python get-pip.py
步骤失败并出现以下错误。
Traceback (most recent call last):
File "get-pip.py", line 24226, in <module>
main()
File "get-pip.py", line 199, in main
bootstrap(tmpdir=tmpdir)
File "get-pip.py", line 82, in bootstrap
from pip._internal.cli.main import main as pip_entry_point
File "/tmp/tmpUgc5ng/pip.zip/pip/_internal/cli/main.py", line 60
sys.stderr.write(f"ERROR: {exc}")
^
SyntaxError: invalid syntax
Run Code Online (Sandbox Code Playgroud)
直到昨天,这一切正常。不知道为什么这现在不起作用。
我认为这可能是因为 Windows,但我检查了运行 linux 的本地机器,但这些步骤但它们工作正常。
按照此页面上的说明在 python2 https://linuxhint.com/installing_pip_linux_mint/上安装 pip
最后一步失败了
$ sudo python2 get-pip.py
出现这个错误,
Traceback (most recent call last):
File "get-pip.py", line 24226, in <module>
main()
File "get-pip.py", line 199, in main
bootstrap(tmpdir=tmpdir)
File "get-pip.py", line 82, in bootstrap
from pip._internal.cli.main import main as pip_entry_point
File "/tmp/tmp2aZyDl/pip.zip/pip/_internal/cli/main.py", line 60
sys.stderr.write(f"ERROR: {exc}")
^
SyntaxError: invalid syntax
Run Code Online (Sandbox Code Playgroud)
我试图到处寻找解决方案,但找不到。我做错了什么?
我在这里收到了我的Atom阅读器的错误消息,其中建议第一个print.(f"message")
是发送错误:
File "/Users/permanentmajority/Desktop/Coding/learnpythonbook.py", line 75
print(f"Let's talk about {my_name}.")
^
SyntaxError: invalid syntax
[Finished in 0.077s]
Run Code Online (Sandbox Code Playgroud)
码:
my_name = 'Zed A. Shaw'
my_age = 35 # not a lie
my_height = 74 # inches
my_weight = 180 #lbs
my_eyes = 'Blue'
my_teeth = 'White'
my_hair = 'Brown'
print(f"Let's talk about {my_name}.")
print(f"He's {my_height} inches tall.")
print(f"He's {my_weight} pounds heavy.")
print("Actually that's not too heavy.")
print(f"He's got {my_eyes} eyes and {my_hair} hair.")
print(f"His teeth are usually {my_teeth} depending on …
Run Code Online (Sandbox Code Playgroud)