我正在尝试使用sphinxcontrib.programoutput自动记录软件的--help
命令。
我的第一个样子:
.. command-output:: squiggle --help
并且完全按照预期在本地工作。但是,当我将其放在ReadTheDocs上时,会出现此错误:
$ squiggle --help
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/squiggle/envs/latest/bin/squiggle", line 11, in <module>
load_entry_point('squiggle==0.1', 'console_scripts', 'squiggle')()
File "/home/docs/checkouts/readthedocs.org/user_builds/squiggle/envs/latest/lib/python3.5/site-packages/pkg_resources/__init__.py", line 565, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/home/docs/checkouts/readthedocs.org/user_builds/squiggle/envs/latest/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2631, in load_entry_point
return ep.load()
File "/home/docs/checkouts/readthedocs.org/user_builds/squiggle/envs/latest/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2291, in load
return self.resolve()
File "/home/docs/checkouts/readthedocs.org/user_builds/squiggle/envs/latest/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2297, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
ImportError: No module named 'squiggle'
对我来说,没有意义的是我的道路似乎是正确的,因为autodoc正在运行。
此问题的根源是什么?
有关更多信息,可以查看here。
答案 0 :(得分:0)
解决了!我改变了
location ~/ThirdPartySoftware.php {
root $MAGE_ROOT;
fastcgi_pass fastcgi_backend;
fastcgi_index ThirdPartySoftware.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi_params;
}
到
py_modules=['squiggle']
在我的setup.py文件中。