Skip to content

SantaBarbaraDataSystems

— IT happens.

  • /SBDS.com/etc/
  • /SBDS.com/root/

install Python3 inside a virtual environment, and compile mod_wsgi

Posted on January 11, 2017 - March 14, 2017 by elijah

install Python 3.6.0

wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz
tar xzvf Python-3.6.0.tgz
cd Python-3.6.0
./configure --prefix=/usr/local --enable-shared
make
make altinstall

In case of an error like this: “/usr/local/bin/python3.6: error while loading shared libraries: libpython3.6m.so.1.0: cannot open shared object file: No such file or directory“, do this:

vim /etc/ld.so.conf
  [+] /usr/local/lib
ldconfig

install a Python virtual environment

/usr/local/bin/python3.6 -m venv /stuff/grafster/env36
source /stuff/grafster/env36/bin/activate
pip install --upgrade pip

upgrade mod_wsgi to run Python 3 applications

cd /stuff/downloads/mod_wsgi
git pull
./configure --with-python=/stuff/wholebadgermilk/env36/bin/python
make clean
make
make install
Posted in Centos7, installs, Python

Post navigation

kill an SSH session in Linux
install Sensu with Redis, RabbitMQ, Carbon, Graphite-API

Recent Posts

  • delete
  • cabon-cache TLS error after update
  • setup Firewalld
  • Apache security settings
  • curl for public IP address

Categories

  • Apache
  • Centos7
  • errors
  • Firewalld
  • installs
  • Mutt
  • networking
  • Python
  • server configs
  • useful commands

Recent Comments

    Archives

    • March 2017
    • January 2017
    • December 2016
    • October 2016
    • August 2016

    Meta

    • Log in
    • Entries feed
    • Comments feed
    • WordPress.org
    Proudly powered by WordPress | Theme: micro, developed by DevriX.