<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Pip on Ricky</title><link>https://linzeyan.github.io/categories/pip/</link><description>Recent content in Pip on Ricky</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Wed, 04 Mar 2020 15:43:38 +0800</lastBuildDate><atom:link href="https://linzeyan.github.io/categories/pip/index.xml" rel="self" type="application/rss+xml"/><item><title>Python install module issues</title><link>https://linzeyan.github.io/posts/2020/20200304-i-cant-install-python-ldap/</link><pubDate>Wed, 04 Mar 2020 15:43:38 +0800</pubDate><guid>https://linzeyan.github.io/posts/2020/20200304-i-cant-install-python-ldap/</guid><description>&lt;ul>
&lt;li>&lt;a href="https://stackoverflow.com/questions/4768446/i-cant-install-python-ldap" target="_blank" rel="noopener">I can&amp;rsquo;t install python-ldap&lt;/a>&lt;/li>
&lt;/ul>
&lt;h4 id="python-ldap">python-ldap&lt;/h4>
&lt;blockquote>
&lt;p>&lt;a href="https://www.python-ldap.org/en/latest/installing.html" target="_blank" rel="noopener">https://www.python-ldap.org/en/latest/installing.html&lt;/a>&lt;/p>&lt;/blockquote>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ pip install python-ldap
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>In file included from Modules/LDAPObject.c:9:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Modules/errors.h:8: fatal error: lber.h: No such file or directory
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>
&lt;p>Debian/Ubuntu:
&lt;code>sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev&lt;/code>&lt;/p>
&lt;/li>
&lt;li>
&lt;p>RedHat/CentOS:&lt;/p>
&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>sudo yum install python-devel openldap-devel
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>sudo yum groupinstall &lt;span style="color:#e6db74">&amp;#34;Development tools&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="molecule">molecule&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ pip install molecule
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>error: command &lt;span style="color:#e6db74">&amp;#39;gcc&amp;#39;&lt;/span> failed with exit status &lt;span style="color:#ae81ff">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ----------------------------------------
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Command &lt;span style="color:#e6db74">&amp;#34;/usr/bin/python2 -u -c &amp;#34;&lt;/span>import setuptools, tokenize;__file__&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#39;/tmp/pip-install-I5DGC3/psutil/setup.py&amp;#39;&lt;/span>;f&lt;span style="color:#f92672">=&lt;/span>getattr&lt;span style="color:#f92672">(&lt;/span>tokenize, &lt;span style="color:#e6db74">&amp;#39;open&amp;#39;&lt;/span>, open&lt;span style="color:#f92672">)(&lt;/span>__file__&lt;span style="color:#f92672">)&lt;/span>;code&lt;span style="color:#f92672">=&lt;/span>f.read&lt;span style="color:#f92672">()&lt;/span>.replace&lt;span style="color:#f92672">(&lt;/span>&lt;span style="color:#e6db74">&amp;#39;\r\n&amp;#39;&lt;/span>, &lt;span style="color:#e6db74">&amp;#39;\n&amp;#39;&lt;/span>&lt;span style="color:#f92672">)&lt;/span>;f.close&lt;span style="color:#f92672">()&lt;/span>;exec&lt;span style="color:#f92672">(&lt;/span>compile&lt;span style="color:#f92672">(&lt;/span>code, __file__, &lt;span style="color:#e6db74">&amp;#39;exec&amp;#39;&lt;/span>&lt;span style="color:#f92672">))&lt;/span>&lt;span style="color:#e6db74">&amp;#34; install --record /tmp/pip-record-Fy7V4X/install-record.txt --single-version-externally-managed --compile&amp;#34;&lt;/span> failed with error code &lt;span style="color:#ae81ff">1&lt;/span> in /tmp/pip-install-I5DGC3/psutil/
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>RedHat/CentOS:&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>yum -y install gcc gcc-c++ kernel-devel
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>yum -y install python-devel libxslt-devel libffi-devel openssl-devel
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="ansible">ansible&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ pip install ansible
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>ImportError: No module named pkg_resources
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>yum install -y python-setuptools
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;hr>
&lt;h4 id="import-pandas">&lt;code>import pandas&lt;/code>&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>ModuleNotFoundError: No module named &lt;span style="color:#e6db74">&amp;#39;_bz2&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>apt-get install -y libbz2-dev
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>yum install -y bzip2-devel
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="from-cv2-import-">&lt;code>from .cv2 import *&lt;/code>&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>ImportError: libSM.so.6: cannot open shared object file: No such file or directory
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>ImportError: libXrender.so.1: cannot open shared object file: No such file or directory
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>ImportError: libXext.so.6: cannot open shared object file: No such file or directory
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>Ubuntu:&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>apt-get install libsm6
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>apt-get install libxrender1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>apt-get install libxext-dev
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>CentOS:&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>yum install libSM
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>yum install libXrender-devel
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>yum install libXext
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item></channel></rss>