Python Forum
Buildtools installation on python 3.6.4
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Buildtools installation on python 3.6.4
#1
I'm trying to build a local copy of the wxpython pheonix documemtation.
I have installed sphinx without issue.
i then installed (or so i thought) buildtools with pip into my c:\Python364 instance.
I'm sure I.m using the proper pip, and when I look in C:\Python364\Lib\site-packages, I see buildtools-1.0.6-py3.6.egg-info,
which contains only text files: PKG-INFO, SOURCES.txt, dependency_links.txt, entry_points.txt, installed-files.txt, requires.txt, and top_level.txt
checked all the requirements, and they are installed.
yet when I try to run 'make html' from the wxpython docs directory, I get
an error: ModuleNotFoundError: No module named 'buildtools'
full:
Error:
λ make html Running Sphinx v1.6.5 Exception occurred: File "conf.py", line 60, in <module> from buildtools.config import Config ModuleNotFoundError: No module named 'buildtools' The full traceback has been saved in ...\AppData\Local\Temp\sphinx-err-jj8hok4w.log, if you want to report the issue to the developers. Please also report this if it was a user error, so that a better error message can be provided next time. A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
log file contains:
Output:
# Sphinx version: 1.6.5 # Python version: 3.6.4 (CPython) # Docutils version: 0.14 # Jinja2 version: 2.10 # Last messages: # Loaded extensions: Traceback (most recent call last): File "c:\python364\lib\site-packages\sphinx\cmdline.py", line 305, in main opts.warningiserror, opts.tags, opts.verbosity, opts.jobs) File "c:\python364\lib\site-packages\sphinx\application.py", line 168, in __init__ confoverrides or {}, self.tags) File "c:\python364\lib\site-packages\sphinx\config.py", line 150, in __init__ execfile_(filename, config) File "c:\python364\lib\site-packages\sphinx\util\pycompat.py", line 150, in execfile_ exec_(code, _globals) File "conf.py", line 60, in <module> from buildtools.config import Config ModuleNotFoundError: No module named 'buildtools'
so I started python from cmder, and typed import buildtools
... not there

Attempt reinstall:
pip install buildtools and get: 'Requirement already satisfied'
so i try pip -V and get: 'pip 9.0.1 from c:\python364\lib\site-packages (python 3.6)'

Don't know what the next step might be.

Any ideas?
(I'm ready to scrape the html tree)
Reply
#2
E:\1py_div
λ python -m venv sph_env

E:\1py_div
λ cd sph_env

E:\1py_div\sph_env
λ E:\1py_div\sph_env\Scripts\Activate
(sph_env) E:\1py_div\sph_env
λ pip install Sphinx

(sph_env) E:\1py_div\sph_env
λ make html
Running Sphinx v1.6.5
making output directory...
loading pickled environment... not yet created
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 24 source files that are out of date
updating environment: 24 added, 0 changed, 0 removed
reading sources... [100%] index
So it work,some error message about toctree.
It generate html files.

So would i try to install to OS Python,
no i would not if it work in virtual-environment i am finish.
Reply
#3
I tried as above, but get same error as before in the virtual environment.
Reply
#4
What happens when you run python3 -c "import buildtools; print(buildtools)"?
Reply
#5
(Jan-07-2018, 02:53 AM)Larz60+ Wrote: I tried as above, but get same error as before in the virtual environment.
Hmm are you sure you doing it right?
The problem can be that is using wrong conf.py
There is a conf.py in wx_python\Phoenix\docs\sphinx\conf.py
Has this in line 60:
from buildtools.config  import Config
The conf.py in my virtual environment root folder 57-60.
# The short X.Y version.
version = '3.6'
# The full version, including alpha/beta/rc tags.
release = '3.6'
There is no need for buildtools,it's for an old version:
look first in conf.py in Phoenix\docs\sphinx.
# Phoenix documentation build configuration file, created by
# sphinx-quickstart on Mon Jun 22 09:32:57 2009.
Reply
#6
That was it. I will report as a bug
Thanks snippsat
Reply
#7
I spoke too soon, now I get:
λ make html
Error:
Running Sphinx v1.6.5 c:\python364\lib\site-packages\sphinx\util\compat.py:40: RemovedInSphinx17Warning: sphinx.util.compat.Directive is deprecated and will be removed in Sphinx 1.7, please use docutils' instead. RemovedInSphinx17Warning) Extension error: Could not import extension availability (exception: cannot import name 'make_admonition')
and I can't figure out where the error is coming from.
It's not in the makefile, so I'll dig into compat.py
I didn't want to have to learn how to use docutils, but I guess it's time to learn!
Reply
#8
Quote:c:\python364\lib\site-packages\sphinx\util\compat.py
Still not using virtual environment.

I tried with pipenv,then all error is gone.
I did make html file with build in venv,but got some errors.
In pipenv no errors when run make html.
C:\1\sp
λ make html
Running Sphinx v1.6.5
making output directory...
loading pickled environment... not yet created
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 1 source files that are out of date
updating environment: 1 added, 0 changed, 0 removed
reading sources... [100%] index
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] index
generating indices... genindex
writing additional pages... search
copying static files... done
copying extra files... done
dumping search index in English (code: en) ... done
dumping object inventory... done
build succeeded.

Build finished. The HTML pages are in _build\html.
The usage is simple.
pip install -U pipenv
Make a folder eg sp,cd into folder.
C:\1\sp
λ pipenv install Sphinx
Now activate folder:
C:\1\sp
λ pipenv shell
Launching subshell in virtual environment. Type 'exit' to return.
Then run sphinx-quickstart and make html.

Nice graph over dependencies with pipenv.
C:\1\sp
λ pipenv graph
Sphinx==1.6.5
  - alabaster [required: <0.8,>=0.7, installed: 0.7.10]
  - babel [required: >=1.3,!=2.0, installed: 2.5.1]
    - pytz [required: >=0a, installed: 2017.3]
  - colorama [required: >=0.3.5, installed: 0.3.9]
  - docutils [required: >=0.11, installed: 0.14]
  - imagesize [required: Any, installed: 0.7.1]
  - Jinja2 [required: >=2.3, installed: 2.10]
    - MarkupSafe [required: >=0.23, installed: 1.0]
  - Pygments [required: >=2.0, installed: 2.2.0]
  - requests [required: >=2.0.0, installed: 2.18.4]
    - certifi [required: >=2017.4.17, installed: 2017.11.5]
    - chardet [required: <3.1.0,>=3.0.2, installed: 3.0.4]
    - idna [required: >=2.5,<2.7, installed: 2.6]
    - urllib3 [required: >=1.21.1,<1.23, installed: 1.22]
  - setuptools [required: Any, installed: 38.4.0]
  - six [required: >=1.5, installed: 1.11.0]
  - snowballstemmer [required: >=1.1, installed: 1.2.1]
  - sphinxcontrib-websupport [required: Any, installed: 1.0.1] 
Reply
#9
I don't know why it works for you and not for me.
I built a virtual environment and keep everything inside:
I cannot find a distribution for make_admonition
Phoenix is latest (development) branch

λ python -m venv Phoenix
# Then download and unzip phoenix:
M:\python\m-p\p\Phoenix
λ Scripts\activate.bat
(Phoenix) λ ls
Include/  Lib/  Phoenix-master.zip  pyvenv.cfg  Scripts/
# Even make sure 7zip is in environment:
M:\python\m-p\p\Phoenix
(Phoenix) λ mkdir 7zip

M:\python\m-p\p\Phoenix
(Phoenix) λ cd 7zip

M:\python\m-p\p\Phoenix\7zip
(Phoenix) λ ls
7z.dll*  7z.sfx*          7zCon.sfx*  7zG.exe*   7-zip.dll*    descript.ion  Lang/        readme.txt
7z.exe*  7z1701-x64.exe*  7zFM.exe*   7-zip.chm  7-zip32.dll*  History.txt   License.txt  Uninstall.exe

M:\python\m-p\p\Phoenix
(Phoenix) λ ls
7zip/  Include/  Lib/  Phoenix-master/  pip-selfcheck.json  pyvenv.cfg  Scripts/

M:\python\m-p\p\Phoenix
(Phoenix) λ pip install -U pipenv
Collecting pipenv
...
Successfully installed certifi-2017.11.5 chardet-3.0.4 flake8-3.5.0 idna-2.6 mccabe-0.6.1 pew-1.1.2 pipenv-9.0.1 psutil-5.3.1 pycodestyle-2.3.1 pyflakes-1.6.0 requests-2.18.4 setuptools-38.4.0 urllib3-1.22 virtualenv-15.1.0 virtualenv-clone-0.2.6

M:\python\m-p\p\Phoenix
(Phoenix) λ pipenv install Sphinx
...
Successfully installed Jinja2-2.10 MarkupSafe-1.0 Pygments-2.2.0 Sphinx-1.6.5 alabaster-0.7.10 babel-2.5.1 colorama-0.3.9 docutils-0.14 imagesize-0.7.1 pytz-2017.3 six-1.11.0 snowballstemmer-1.2.1 sphinxcontrib-websupport-1.0.1

(Phoenix) λ cd M:\python\m-p\p\Phoenix\Phoenix-master\docs\sphinx

M:\python\m-p\p\Phoenix\Phoenix-master\docs\sphinx
(Phoenix) λ ls
_downloads/  _templates/      build/   itemToModuleMap.json  Makefile        rest_substitutions/
_static/     availability.py  conf.py  make.bat              phoenix_theme/

# change version and release in conf.py, and remove buildtools
(Phoenix) λ vi conf.py

M:\python\m-p\p\Phoenix\Phoenix-master\docs\sphinx
(Phoenix) λ make html
Running Sphinx v1.6.5
m:\python\m-p\p\phoenix\lib\site-packages\sphinx\util\compat.py:40: RemovedInSphinx17Warning: sphinx.util.compat.Directive is deprecated and will be removed in Sphinx 1.7, please use docutils' instead.
  RemovedInSphinx17Warning)

Extension error:
Could not import extension availability (exception: cannot import name 'make_admonition')

M:\python\m-p\p\Phoenix\Phoenix-master\docs\sphinx
(Phoenix) λ
Reply
#10
Do me a favor, zip up your html and make available
can use uuencode if zip not ok: https://www.mkssoftware.com/docs/man1/uuencode.1.asp
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python installation for old MacOS Yonix 1 488 Sep-21-2023, 03:32 PM
Last Post: menator01
  Installation of packages to newest Python version from previous one Andrzej_Andrzej 3 829 Jul-15-2023, 11:32 AM
Last Post: snippsat
  How to see the date of installation of python modules. newbieAuggie2019 4 1,573 Mar-31-2023, 12:40 PM
Last Post: newbieAuggie2019
  Getting "SSL client not supported by this Python installation" error prabirsarkar 0 951 Mar-13-2023, 05:01 PM
Last Post: prabirsarkar
  python installation/running inside singularity container erdemath 2 1,770 Sep-21-2022, 08:13 AM
Last Post: erdemath
Question Python V3.11 Installation Help Danno 2 1,093 Aug-11-2022, 02:30 AM
Last Post: Danno
  Portable installation of Python possible? pstein 2 3,076 Nov-15-2020, 12:14 PM
Last Post: snippsat
  python and openCV installation dejhost 16 10,815 Aug-04-2020, 02:23 AM
Last Post: snippsat
  No Scripts File present after python installation ag2207 5 4,883 Jul-30-2020, 11:11 AM
Last Post: buran
  Cannot find Python installation folder when I install Anaconda bsbsbsbs 1 2,215 Jul-14-2020, 03:14 PM
Last Post: dgrunwal

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020