Sphinx instructed to use a specific version of Python

I have a project that can only work with a 32-bit build of Python 2.7 . Unfortunately, my Sphinx design insists on using a 64-bit build. I spent most of three hours creating Sphinx so that when using the sphinx-quickstart utility it starts up with my 32-bit python . The last thing I tried was to modify the Sphinx makefile , replacing each occurrence of $(PYTHON) with the path to 32-bit python . For instance:

 build: @$(PYTHON) setup.py build 

has become

 build: @python2.7-32 setup.py build 

Then i ran

 ~/Downloads/Sphinx-1.2b1 make ~/Downloads/Sphinx-1.2b1 python2.7-32 setup.py install 

The build went well, but the Sphinx still insists on using the "wrong" version of python . I have given up hope of solving this problem myself, and I am looking for some guidance.

Many thanks

+4
source share
1 answer

Use virtualenv --python=PYTHON_EXE to create a virtual environment with your preferred version of Python. This ensures that the packages you install will work against your preferred version of Python.

0
source

Source: https://habr.com/ru/post/1497123/


All Articles