title: /usr/bin/ld: cannot find -lpython3.6m
body: <p>I am trying to install bitarray using pip which fails during linking libpython.</p>
  
  <pre><code>  Downloading https://repo/api/pypi/python/packages/packages/eb/fd/bf67cfea810305148ab8a1e8fbdcc5179f56979c73907fec9a36ebd4a58a/bitarray-1.2.0.tar.gz (48kB)
  Installing collected packages: bitarray
      Running setup.py install for bitarray: started
      Running setup.py install for bitarray: finished with status 'error'
      ERROR: Command errored out with exit status 1:
       command: /opt/rp/python-3.6.9/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-80tjlaa0/bitarray/setup.py'"'"'; __file__='"'"'/tmp/pip-install-80tjlaa0/bitarray/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-lr_6fezd/install-record.txt --single-version-externally-managed --compile
           cwd: /tmp/pip-install-80tjlaa0/bitarray/
      Complete output (19 lines):
      running install
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.6
      creating build/lib.linux-x86_64-3.6/bitarray
      copying bitarray/__init__.py -&gt; build/lib.linux-x86_64-3.6/bitarray
      copying bitarray/test_bitarray.py -&gt; build/lib.linux-x86_64-3.6/bitarray
      copying bitarray/test_util.py -&gt; build/lib.linux-x86_64-3.6/bitarray
      copying bitarray/util.py -&gt; build/lib.linux-x86_64-3.6/bitarray
      running build_ext
      building 'bitarray._bitarray' extension
      creating build/temp.linux-x86_64-3.6
      creating build/temp.linux-x86_64-3.6/bitarray
      gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -O -m64 -fPIC -I/opt/rp/python-3.6.9/include/python3.6m -c bitarray/_bitarray.c -o build/temp.linux-x86_64-3.6/bitarray/_bitarray.o
      gcc -pthread -shared -m64 -Wl,-R/home/jenkins/workspace/python-centos7/python-3.6.9/lib,-R/opt/rp/mysql/lib build/temp.linux-x86_64-3.6/bitarray/_bitarray.o -L/home/jenkins/workspace/centos7/python-3.6.9/lib -lpython3.6m -o build/lib.linux-x86_64-3.6/bitarray/_bitarray.cpython-36m-x86_64-linux-gnu.so
      /usr/bin/ld: cannot find -lpython3.6m
      collect2: error: ld returned 1 exit status
      error: command 'gcc' failed with exit status 1
      ----------------------------------------
  ERROR: Command errored out with exit status 1: /opt/alu-rp/python-3.6.9/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-80tjlaa0/bitarray/setup.py'"'"'; __file__='"'"'/tmp/pip-install-80tjlaa0/bitarray/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-lr_6fezd/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
  </code></pre>
  
  <p>But I could see the Libpython.so files </p>
  
  <pre><code>/opt/rp/python-3.6.9/lib/libpython3.6m.so.1.0
  /opt/rp/python-3.6.9/lib/libpython3.6m.so
  /opt/rp/python-3.6.9/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a
  </code></pre>
  
  <p>And my <code>$LD_LIBRARY_PATH</code> is <code>/opt/rp/python-3.6.9/lib:/opt/rp/mysql/lib:/opt/rp/python-3.6.9/lib:/opt/rp/mysql/lib</code>.</p>
  
  <p>How to link the libpython to make the installation complete</p>