I'm getting the following when trying to install Python 3.6.2 on RHEL 6.7/ CentOS 6.7:
Python build finished successfully!
The necessary bits to build these optional modules were not found:
_lzma _sqlite3 _ssl
_tkinter
To find the necessary bits, look in setup.py in detect_modules() for the module's name
So I look in setup.py, and find that I need sqlite3.h and ssl.h. However, it's not clear to me on which libraries for tkinter and lzma are needed. From setup.py:
# LZMA compression support.
if self.compiler.find_library_file(lib_dirs, 'lzma'):
exts.append( Extension('_lzma', ['_lzmamodule.c'],
libraries = ['lzma']) )
else:
missing.append('_lzma')
...
# Call the method for detecting whether _tkinter can be compiled
self.detect_tkinter(inc_dirs, lib_dirs)
if '_tkinter' not in [e.name for e in self.extensions]:
missing.append('_tkinter')
...
I'm trying to find which library files are needed, to find what RPMs I need to install. Any thoughts?
I barely know CentOS but look for a package python3-tkinter. Also, you can try to install openssl and openssl-devel/openssl-dev. Don't know haw the second package is called exactly. Installing sqlite3 should be ismple enough. Try with this name. Don't know for lzma. You could just try yum install lzma.
I guess you have missing stuff in preparations of build essential tool.
This should cover the most,not tested.
# Start by making sure your system is up-to-date:
sudo yum update
sudo yum install yum-utils
sudo yum groupinstall development
# Libraries needed during compilation to enable all features of Python:
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel expat-devel
# pip to manage Python packages,and some development packages.
sudo yum install python36u-pip
sudo yum install python36u-devel
I have tutorial about
pyenv,
here,
it work also for CentOS makes it easy to install new Python versions,and also easier if want to try Anaconda,PyPy,Ironpython...ect.
I get the following errors which prevent install when I run:
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel expat-devel
Output:
Error: Package: sqlite-devel-3.6.20-1.el6.x86_64 (RHEL6.7_ISO)
Requires: sqlite = 3.6.20-1.el6
Installed: sqlite-3.6.20-1.el6_7.2.i686 (@RHEL_UPDATES_2015)
sqlite = 3.6.20-1.el6_7.2
Available: sqlite-3.6.20-1.el6.i686 (RHEL6.7_ISO)
sqlite = 3.6.20-1.el6
Error: Package: openssl-devel-1.0.1e-42.el6.x86_64 (RHEL6.7_ISO)
Requires: openssl = 1.0.1e-42.el6
Installed: openssl-1.0.1e-42.el6_7.2.i686 (@RHEL_UPDATES_2015)
openssl = 1.0.1e-42.el6_7.2
Available: openssl-1.0.1e-42.el6.i686 (RHEL6.7_ISO)
openssl = 1.0.1e-42.el6
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
It seems the python installer is looking for a slightly older version of the RPMs. As this python version is new and the RPM is for an older (but still supported) OS version, that doesn't make sense to me. Am I missing something here? Any thoughts on what I need to do to get past this problem?
Also, what repositories are python36u-pip and python36u-devel in? I haven't seen those before.
Try with less not sure if all is needed.
Take look at Digital Ocean CentOS
tutorial,there always start with a blank distro.
I always use
pyenv to install new versions.
mint@mint ~ $ pyenv install 3.6.2
Downloading Python-3.6.2.tar.xz...
-> https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tar.xz
Installing Python-3.6.2...
Installed Python-3.6.2 to /home/mint/.pyenv/versions/3.6.2
# Make python and pip default to 3.6.2
mint@mint ~ $ pyenv global 3.6.2
Finish.
I ended up getting our Satellite server updated with the latest RPMs, which solved my dependencies and this problem.
If you just need a command to install all build dependencies, you can look into the pyenv wiki:
https://github.com/pyenv/pyenv/wiki
There you'll have the overview for the most distributions also Cent Os:
- CentOS/Fedora 21 and below:
FIXME: you may need to install xz to build some CPython version
yum install gcc zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel tk-devel
Thanks. I ended up getting the libraries I needed from the Satellite server. But I'll keep pyenv in mind.