Python - make: ../bin/sphinx-build:命令未找到 解决办法

本文详细介绍了如何解决安装pyquery框架时遇到的文档缺失问题,并通过使用sphinx工具成功生成了框架的HTML文档。同时,文章解释了pyquery框架的功能和用途,为读者提供了一个初步了解该框架的窗口。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

我之前用easy_install pyquery安装了pyquery这个框架,但是发现没有文档,因此我去它的网站下了一份源代码,幸好里面有docs文件,打开看了下,是还没有编译的,于是在终端中输入make:

huangjacky@huangjacky-laptop:~/program/code/Python_Framework/pyquery/docs$ make
 Please use `make <target>' where <target> is one of
 html to make standalone HTML files
 pickle to make pickle files
 json to make JSON files
 htmlhelp to make HTML files and a HTML help project
 latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
 changes to make an overview over all changed/added/deprecated items
 linkcheck to check all external links for integrity

提示要带参数,我们需要输出html的,所以就输入make html:

huangjacky@huangjacky-laptop:~/program/code/Python_Framework/pyquery/docs$ make html
mkdir -p _build/html _build/doctrees
../bin/sphinx-build -b html -d _build/doctrees . _build/html
make: ../bin/sphinx-build:命令未找到
make: *** [html] 错误 127

提示sphinx-build没有找到,说明它使用到什么东西,我们没有安装,google了一下,原来是一个python的库,于是在终端输入 sudo easy_install Sphinx,安装成功了。 再次在终端中输入make html 但是还是同样的错误,看了下它../bin/sphinx-build,看来它把人家sphinx当成自己的一个文件夹了,好吧,我们直接用sphinx-build命令对docs文件夹生成html吧,在终端中输入:sphinx-build 需要编译的docs文件夹 输出的目录

huangjacky@huangjacky-laptop:~/program/code/Python_Framework/pyquery$ sphinx-build docs html
Making output directory...
Running Sphinx v1.1.3
loading pickled environment... not yet created
No builder selected, using default: html
building [html]: targets for 11 source files that are out of date
updating environment: 11 added, 0 changed, 0 removed
Traceback (most recent call last): 
 File "/usr/local/lib/python2.7/dist-packages/Sphinx-1.1.3-py2.7.egg/sphinx/ext/autodoc.py", line 321, in import_object
 __import__(self.modname)
 File "/usr/local/lib/python2.7/dist-packages/pyquery-1.2.1-py2.7.egg/pyquery/ajax.py", line 6, in <module>
 from webob import Request, Response
ImportError: No module named webob
reading sources... [100%] traversing 
/home/huangjacky/program/code/Python_Framework/pyquery/docs/ajax.txt:4: WARNING: autodoc can't import/find module 'pyquery.ajax', it reported error: "No module named webob", please check your spelling and sys.path
/home/huangjacky/program/code/Python_Framework/pyquery/docs/ajax.txt:54: WARNING: don't know which module to import for autodocumenting u'PyQuery' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)
/usr/local/lib/python2.7/dist-packages/pyquery-1.2.1-py2.7.egg/pyquery/pyquery.py:docstring of pyquery.pyquery.PyQuery.html:9: WARNING: Inline literal start-string without end-string.
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] traversing 
writing additional files... genindex py-modindex search
copying static files... WARNING: html_static_path entry '/home/huangjacky/program/code/Python_Framework/pyquery/docs/_static' does not exist
done
dumping search index... done
dumping object inventory... done
build succeeded, 4 warnings.

输出了一大段的提示,但是可以看到最后提示build succeeded,哈哈发现和docs同目录下已经生成了html文件夹。 搞定了。 至于pyquery是干什么的,大家可以看这里。 以后有时间的话,我会写几个例子来讲解它的用法。

我使用的是linux Ubuntuubuntu@ubuntu-virtual-machine:~/桌面/gromacs-2018.8/build$ sudo cmake .. -DCMAKE_INSTALL_PREFIX=/home/ubuntu/gmx2018.8 -DGMX_SIMD=AVX2_256 -DGMX_BUILD_OWN_FFTW=OFF CMake Warning (dev) at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:438 (message): The package name passed to `find_package_handle_standard_args` (pygments) does not match the name of the calling package (Sphinx). This can lead to problems in calling code that expects `find_package` result variables (e.g., `_FOUND`) to follow a certain pattern. Call Stack (most recent call first): cmake/FindPythonModule.cmake:76 (find_package_handle_standard_args) cmake/FindSphinx.cmake:61 (find_python_module) docs/CMakeLists.txt:68 (find_package) This warning is for project developers. Use -Wno-dev to suppress it. -- Configuring done -- Generating done -- Build files have been written to: /home/ubuntu/桌面/gromacs-2018.8/build ubuntu@ubuntu-virtual-machine:~/桌面/gromacs-2018.8/build$ sudo make install Consolidate compiler generated dependencies of target tng_io_zlib [ 0%] Built target tng_io_zlib Consolidate compiler generated dependencies of target tng_io_obj [ 2%] Built target tng_io_obj Consolidate compiler generated dependencies of target libgromacs [ 2%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/mdlib/minimize.cpp.o /home/ubuntu/桌面/gromacs-2018.8/src/gromacs/mdlib/minimize.cpp: In function ‘double gmx::do_steep(FILE*, t_commrec*, const gmx::MDLogger&, int, const t_filenm*, const gmx_output_env_t*, const MdrunOptions&, gmx_vsite_t*, gmx_constr_t, gmx::IMDOutputProvider*, t_inputrec*, gmx_mtop_t*, t_fcdata*, t_state*, ObservablesHistory*, gmx::MDAtoms*, t_nrnb*, gmx_wallcycle_t, t_forcerec*, const ReplicaExchangeParameters&, gmx_membed_t*, gmx_walltime_accounting_t)’: /home/ubuntu/桌面/gromacs-2018.8/src/gromacs/mdlib/minimize.cpp:2542:32: error: ‘numeric_limits’ is not a member of ‘std’ 2542 | s_try->epot = std::numeric_limits<real>::infi
03-12
sudo apt-get install -y \ cmake \ g++ \ git \ google-mock \ libboost-all-dev \ libcairo2-dev \ libeigen3-dev \ libgflags-dev \ libgoogle-glog-dev \ liblua5.2-dev \ libsuitesparse-dev \ libwebp-dev \ ninja-build \ protobuf-compiler \ python-sphinx 2.安装protobuf3 2.1卸载ros自带的protobuf2 sudo apt-get remove libprotobuf-dev which protoc ###显示protoc的路径如果没有显示则下面这条命令省略 rm /usr/local/bin/protoc ###以which protoc显示的路径为准,默认一般为usr/bin/protoc 完成卸载 2.2安装 protobuf3 1.安装依赖库 sudo apt-get inst all autoconf automake libtool curl make g++ unzip 2.git submodule update --init --recursive ###这一步克隆子模块必须有,否则后面会报错(报找不到文件的错) git clone -b v3.6.0 https://github.com/protocolbuffers/protobuf.git ###克隆版本为3.6.0的protobuf cd protobuf git submodule update --init --recursive ###克隆protobuf的子模块,主要是gtest 3.编译并安装protobuf cd protobuf ###运行脚本 ./autogen.sh ./configure make ###如果没有前面的克隆子模块,make check会失败但是可以继续make install,后续使用可能出现问题 make check sudo make install sudo ldconfig 4.检查protobuf相关信息 ###输出protobuf版本信息则表示安装成功 protoc --version ###查看安装位置 which protoc ###默认下载位置为 /usr/local/bin/protoc ###carto的搜索protoc的路径为/ usr/bin/protoc,选择直接copy过去 sudo cp /usr/local/bin/protoc /usr/bin 3.创建工作空间,下载cartographer源码 mkdir carto_ws cd carto_ws mkdir src catkin_init_workspace cd src git clone https://github.com/googlecartographer/cartographer_ros.git git clone https://github.com/googlecartographer/cartographer.git git clone https://github.com/ceres-solver/ceres-solver.git 4.安装Ceres-solver(报错1,2) ###接上面3内容 ###出现问题比较大,建议直接看报错2的方法 cd ceres-solver mkdir ceres-bin cd ceres-bin cmake .. ###########c ———————————————— 版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。 原文链接:https://blog.csdn.net/qq_53004665/article/details/142057918到camke..出现cmake .. -- Build type: Release CMake Deprecation Warning at /usr/src/googletest/googlemock/CMakeLists.txt:41 (cmake_minimum_required): Compatibility with CMak
最新发布
03-25
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值