[[Python3]]
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

python3 [2017/02/01 16:23]
dblume
python3 [2018/07/30 18:01] (current)
dblume [Modules]
Line 2: Line 2:
  
 If I want Python 3.6, I have to compile it myself.  Use "dnf" for RedHat based distros and "apt-get" for Debian. If I want Python 3.6, I have to compile it myself.  Use "dnf" for RedHat based distros and "apt-get" for Debian.
 +
 +===== RedHat based distros =====
  
 <code bash> <code bash>
Line 9: Line 11:
 </code> </code>
  
-I haven't tested [[http://www.unixmen.com/howto-install-python-3-x-in-ubuntu-debian-fedora-centos/|the following]]:+Then on Fedora and macOS...
  
 <code bash> <code bash>
-sudo apt-get install build-essential libncursesw5-dev libreadline5-dev libssl-dev libgdbm-dev libc6-dev libsqlite3-dev tk-dev+wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz 
 +tar -xvf Python-3.7.0.tgz 
 +cd Python-3.7.0/ 
 +./configure --prefix=/usr/local/bin/python3.7 --enable-optimizations 
 +make 
 +sudo make install 
 +# sudo ln -s /usr/local/bin/python3.7/bin/python3 /usr/bin/python3
 </code> </code>
  
-Then...+===== Debian based distros ===== 
 + 
 +For Debian (eg., Rasbian) try [[http://www.unixmen.com/howto-install-python-3-x-in-ubuntu-debian-fedora-centos/|the following]] (on raspberry pi libssl-dev isn't available):
  
 <code bash> <code bash>
-wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz +sudo apt-get install build-essential libncursesw5-dev libreadline-dev libssl-dev libgdbm-dev libc6-dev libsqlite3-dev tk-dev libffi-dev 
-tar -xvf Python-3.6.0.tgz +</code> 
-cd Python-3.6.0/ + 
-./configure --prefix=/opt/python3 +<code> 
-make+The necessary bits to build these optional modules were not found: 
 +_bz2                  _lzma                 _ssl 
 +</code> 
 + 
 +On Raspbian, I put it in the default location: 
 + 
 +<code bash> 
 +cd Python-3.7.0/ 
 +./configure --enable-optimizations 
 +make -j4
 sudo make install sudo make install
-sudo ln -/opt/python3/bin/python3 /usr/bin/python3+</code> 
 + 
 +===== Modules ===== 
 + 
 +Sometimes I have trouble with pip3 (ImportError: cannot import name 'main' from 'pip'), so prefer to use "python 3 -m pip" instead. 
 + 
 +<code bash> 
 +sudo python3 -m pip install --upgrade pip 
 +sudo python3 -m pip install requests 
 +python3 -m pip install --user --upgrade httpie 
 +</code> 
 + 
 +===== Weird hack for impyla ===== 
 + 
 +Refers to https://stackoverflow.com/questions/43918993/python-buildpack-fatal-error-sasl-sasl-h-no-such-file-or-directory 
 + 
 +<code bash> 
 +sudo python3 -m pip install --no-deps impyla 
 +sudo python3 -m pip install --no-deps git+https://github.com/snowch/thrift_sasl 
 +# sudo python3 -m pip install thriftpy
 </code> </code>
python3.1485994990.txt.gz · Last modified: 2017/02/01 16:23 by dblume
 
Recent changes RSS feed Driven by DokuWiki