使用SimpleCV时,显示Missing parentheses in call to 'print'. Did you mean print(...)?
时间: 2024-05-14 10:17:41 浏览: 19
这个错误提示是因为您的代码中有一个 print() 函数调用的括号不完整。在 Python 3.x 版本中,print 是一个函数,如果您要打印一条消息,需要在括号中指定要打印的内容。因此,您需要检查代码中所有的 print() 函数调用,并确保它们的括号是完整的。
例如,如果您的代码中有以下语句:
```
print "Hello World!"
```
则应该修改为:
```
print("Hello World!")
```
这样就可以解决这个错误。
相关问题
Missing parentheses in call to 'print'. Did you mean print(...)?
当出现"Missing parentheses in call to 'print'. Did you mean print(...)"这个错误提示时,意味着在调用print函数时缺少了括号。正确的写法应该是print(),括号内可以是要输出的内容。这个错误提示的意思是是否意味着你要调用print函数而不是字面意义上的print。例如,你可以使用print('Hello World')来正确调用print函数并输出Hello World。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [python报错系列(9)--SyntaxError: Missing parentheses in call to ‘print‘. Did you mean print()](https://blog.csdn.net/qq_45365214/article/details/122712737)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [SyntaxError: Missing parentheses in call to ‘print‘. 正解](https://blog.csdn.net/weixin_45653050/article/details/107306665)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
Missing parentheses in call to 'print'. Did you mean print(path)?
这个错误是因为在Python 3.x版本中,print语句已经被print()函数所取代,因此在使用print语句时需要在括号内添加参数。而在Python 2.x版本中,print语句不需要括号。因此,如果你在Python 3.x版本中使用了print语句而没有添加括号,就会出现这个错误。解决方法是在print语句后添加括号并将要打印的内容放在括号内。例如,如果要打印变量path的值,应该这样写:
```python
print(path)
```
如果你想在Python 2.x版本中使用print语句,也需要在print语句后添加括号。例如:
```python
print("Hello World")
```
相关推荐
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)