1. Download the Python3.6 tar package
Remove comments from line 167 of the Modules/setup file
ReadLine Readline.c-lreadline-ltermcap
2. Download readline-7.0.tar.gz and install
3. Create a soft link for libtermcap.so under the/usr/lib/directory. Originally this directory only libtermcap.so.2, will lead to compile python3.6 the time can not find libtermcap error.
4. Compile and install python3.6
./configure && make && make install
The purpose of these steps is to avoid the "Importerror:no module named ReadLine" error that occurs when you use Python3 after you compile the installation directly.
How to resolve the/usr/bin/ld:cannot find-lxxx error
There are two reasons for this error:
1. The required Lib is not installed (it is possible that the required version is not installed)
The solution is to install the appropriate library (and the correct version)
2. The required library is already installed, but there is no correct link.
Workaround: Create the correct named link. Refer to the third step of python3.6 compilation above.
Reference Links:
http://yuanshuilee.blog.163.com/blog/static/21769727520131130102626998/
http://blog.csdn.net/a936676463/article/details/8480672/
Open SuSE Installation Python3.6