Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Cecil Westerhof Newsgroups: comp.lang.python Subject: Re: Help needed with compiling python Date: Wed, 25 Nov 2015 22:52:23 +0100 Organization: Decebal Computing Lines: 62 Message-ID: <8737vt927c.fsf@Equus.decebal.nl> References: <877fl596c6.fsf@Equus.decebal.nl> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="528adfd6ad074c92fdc6a7f8fb9e23d8"; logging-data="2740"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19/QQHujC0Lzd94CPUbuLOVvCOibyLQe/s=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-Homepage: http://www.decebal.nl/ Cancel-Lock: sha1:qwkdN57iSDv+XqXMS559Kef2shQ= sha1:5nUldziJGnGDAJ7pV7F2a4nh3Eg= Xref: csiph.com comp.lang.python:99493 On Wednesday 25 Nov 2015 21:49 CET, Zachary Ware wrote: > On Wed, Nov 25, 2015 at 2:23 PM, Cecil Westerhof wrote: >> I wanted to install python myself. I started with 2.7.10. If that >> works I also will install 3.5.0. >> >> I did: >> ./configure --prefix=/usr >> make >> make altinstall >> >> I have: >> /usr/bin/python2.7 >> >> But when I execute this, I get: Could not find platform dependent >> libraries Consider setting $PYTHONHOME to >> [:] Python 2.7.10 (default, Nov 25 2015, >> 20:58:29) [GCC 4.8.5] on linux2 Type "help", "copyright", "credits" >> or "license" for more information. Traceback (most recent call >> last): File "/etc/pythonstart", line 7, in import readline >> ImportError: No module named readline >> >> What do I need to do to get it working? > > First off, I strongly suggest not using --prefix=/usr. Stick with > --prefix=/usr/local (the default) to avoid overwriting the system > Python, which may differ from a source build (and, in fact, > overwriting your system Python may be what's causing some of your > problems; those first two lines are worrying). My system python was all-ready damaged: that is why I wanted to build myself. > Secondly, there are several optional modules that are not compiled > unless particular libraries are found to link against, including > readline. You'll need the readline development package (probably > readline-dev or readline-devel, depending on your distribution). You > can quickly pull in the dependencies for all optional modules by > doing something like the following for an apt-based system: `apt-get > build-dep python3`. It is an openSUSE system. I installed the readline with: zypper install readline-devel The strange thing is that it does mot compile anymore now. I get: Python build finished, but the necessary bits to build these modules were not found: _bsddb _tkinter bsddb185 dbm dl gdbm imageop sunaudiodev To find the necessary bits, look in setup.py in detect_modules() for the module's name. I have to look into that. I still can install it, but get the same errors. I think I need a bit more time to solve it. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof