debug时遇到的小问题
weixin_45056784
这个作者很懒,什么都没留下…
展开
-
pip install -r requirements.txt时,明明之前有某个模块却仍报错ModuleNotFoundError
今天在调试文章PaMIR的代码时,用pip install -r requirements.txt下载依赖库,在Collecting opendr时报错ModuleNotFoundError: No module named 'numpy'.并且,之后还接连报错很多个这样的,SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Downloading %s" % osmesa_fname)?不知道是什么意思.原创 2021-09-25 18:11:15 · 566 阅读 · 0 评论 -
Python argparse 模块中用‘store_const‘,‘store_true‘,‘store_false‘创建的选项并未存储目标值
与用’store‘存储时的’default‘选项不同。用'store_const','store_true','store_false'创建的选项,如果你在使用时没有调用它,是不会自动初始化为'const'字段中的值的。例如用'store_const'创建选项,但不调用时:import argparseparser = argparse.ArgumentParser()parser.add_argument('--foo', action='store_const', const = 1)p原创 2021-09-20 17:02:02 · 1140 阅读 · 0 评论