I'm building documentation with sphinx. I use a conda
setup and have py27
and py36
version of python that I switch between. On running sphinx-build ./source ./build
I get the following error:
WARNING: /home/b3053674/Documents/pytseries/docs/source/index.rst:14: (WARNING/2) autodoc: failed to import module u'pytseries.core'; the following exception was raised:
Traceback (most recent call last):
File "/home/b3053674/anaconda2/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 657, in import_object
__import__(self.modname)
File "/home/b3053674/Documents/pytseries/pytseries/core.py", line 193
ts = TimeSeries(**args, feature=self.feature)
^
Note that **args
is a dictionary and that none of my tests give me a syntax error.
After looking again it looks as though the docs for my Python 3 project is being built with a python2.7 interpreter (even though my py36
env is active). I suspect this may be reeking havoc but I can't get sphinx to use my python 3 interpretor.
So how can I get sphinx to use Python 3 as an interpreter?
Edit
also node I have seen this question and have installed python3-sphinx