我正在尝试使用以下命令安装 html2text:
>>pip install --username html2text
我不断收到“语法错误”和指向“安装”中最后一个“l”的箭头...
最佳答案
当您在 python 控制台中运行此命令时会发生这种情况。
演示
$ python
>>> pip install
File "<stdin>", line 1
pip install
^
SyntaxError: invalid syntax
>>> pip install --username html2text
File "<stdin>", line 1
pip install --username html2text
^
SyntaxError: invalid syntax
>>> exit()
$
退出 python 控制台,并在操作系统命令提示符处在 python shell 之外运行它
以下是有效选项的列表:http://pip.readthedocs.org/en/latest/reference/pip_install.html#options也许你的意思是 --upgrade
?
关于PythonAnywhere 为 2.7 安装新模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25345215/