Python only partially found
clicking the import or build button in the sphinx-update-script in the extension-manager of TYPO3 I get the message:
Could not install Sphinx 1.3.1:
error: invalid Python installation: unable to open /usr/local/python/include/python2.6/pyconfig.h (No such file or directory)
In the install-tool I entered the right path to python and if it wouldn't be recognized I never got this message because some python code is already executed.
For being sure I entered a print() in the setup.py and got the result shown too.
The issue seems being that the path to python is somewhere hardcoded or bot populated with the info from the LocalConfiguration.php / installtool
The software is running on a mittwald-server with Linux, Python 2.6.5, PHP 5.6.10 and TYPO3 6.2.15
#1 Updated by David Bruchmann over 4 years ago
[CMD] '/usr/local/bin/python' -V 2>&1 Python 2.6.5 [CMD] '/usr/local/bin/python' -V 2>&1 Python 2.6.5 [CMD] cd '/home/www/pxxxxxx/html/typo3/uploads/tx_sphinx/1.3.1' && '/usr/local/bin/python' setup.py clean 2>&1 && '/usr/local/bin/python' setup.py build 2>&1 running clean running build running build_py running egg_info writing requirements to Sphinx.egg-info/requires.txt writing Sphinx.egg-info/PKG-INFO writing top-level names to Sphinx.egg-info/top_level.txt writing dependency_links to Sphinx.egg-info/dependency_links.txt writing entry points to Sphinx.egg-info/entry_points.txt reading manifest file 'Sphinx.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching 'TODO' no previously-included directories found matching 'doc/_build' writing manifest file 'Sphinx.egg-info/SOURCES.txt' [INFO] Recreating directory /home/www/pxxxxxx/html/typo3/typo3temp/tx_sphinx/sphinx-doc/1.3.1 [CMD] cd '/home/www/pxxxxxx/html/typo3/uploads/tx_sphinx/1.3.1' && export PYTHONPATH='/home/www/pxxxxxx/html/typo3/typo3temp/tx_sphinx/sphinx-doc/1.3.1/lib/python' && '/usr/local/bin/python' setup.py install --home='/home/www/pxxxxxx/html/typo3/typo3temp/tx_sphinx/sphinx-doc/1.3.1' 2>&1 running install error: invalid Python installation: unable to open /usr/local/python/include/python2.6/pyconfig.h (No such file or directory)
As it can be seen in the log the path to python is '/usr/local/bin/python' and this is configured by the installtool too.
In the last step it's tried to find python at the wrong location '/usr/local/python/'
#2 Updated by Hans-Georg Althoff over 4 years ago
I got the same problem. Have my own server with Windows Server2012 R2, IIS, Python 3.5 und Typo3 7.5.
In the attachment you can also see, that there is an error but also a OK for the sphinx version.
I tried to add a Systemvariable PYTHONPATH and PYTHONUSERBASE, but without any success.
In the documentation
I found the following information:
There are older ways to achieve custom installation using various easy_install and setup.py install options, combined with PYTHONPATH and/or PYTHONUSERBASE alterations, but all of these are effectively deprecated by the User scheme brought in by PEP-370 in Python 2.6.
Later on the are talking about user options, but I think that this has to implemented into the code.
I want to put an extension to the TER, but struggle now with the documentation.
It would very helpful, if you could place an comment.
#4 Updated by Xavier Perseguers over 4 years ago
- Status changed from New to Needs Feedback
I don't see any reference to
/usr/local/python in the
[CMD] instructions, only references to the "correct" path you describe, within
/usr/local/bin. Since the missing file is a
.h, I suspect you are running into the same issue as the second known issue documented here: https://docs.typo3.org/typo3cms/extensions/sphinx/AdministratorManual/KnownProblems/Index.html, namely that you are possibly missing python-dev (header files).
#5 Updated by David Bruchmann over 4 years ago
thanks for having a look at it.
Your hint about the header files sounds reasonable and I'll contact the server-support for that.
Would be nice having sphinx as PHP, even it's cool combining several programming-languages on the server it's getting quite complicated and is increasing the efforts a lot.
I will give feedback after answer from the support.
#6 Updated by David Bruchmann over 4 years ago
finally I got the response from the server-support saying:
Die Antwort des Entwicklers klingt plausibel und trifft vermutlich in diesem Fall zu. In unseren Managed-Umgebungen ist es aktuell nicht möglich, Python-dev zu installieren.
Auch eine Installation durch uns lässt sich nicht realisieren.
which means it's probably right that python-dev is not installed and that in the current environment (Hosting-Type) it's not possible to install python-dev. Surly they use it to point to more expensive hosting-packages they sell.
Thanks for your analyze, the ticket can be closed so far.
#8 Updated by David Bruchmann over 4 years ago
Yes thanks, don't mind, I did my best ;-)
The customer is free to book another hosting-package.
Just a bit regrettable that TYPO3 is quite getting high concerning recommendations about hosting, especially for documentation that shouldn't be required in my opinion.
I don't know if I could just upload the docs, generated somewhere else, but that's additional effort too.
#9 Updated by Xavier Perseguers over 4 years ago
Mmh, maybe you did not get it right. This sphinx extension is not a requirement from TYPO3, but from documentation authors who want to write documentation. You don't need it to view extension's manuals, you may just use the (system) extension "documentation" that lets you download ready-to-read versions of the manuals (as rendered on docs.typo3.org).
Please don't hesitate to come to Slack to further discuss if you have questions.
#12 Updated by Xavier Perseguers over 4 years ago
Please open a ticket for missing manuals on https://forge.typo3.org/projects/team-doc-rendering/issues