Installing 3.6 (or Higher)¶
The Snowflake Connector for Python requires python version 3.6, 3.7, or 3.8 to ensure that critical security fixes have been applied. In particular, PEP-476 is required to ensure the Snowflake Connector for Python can verify certificates from the server.
このトピックでは、必要なPythonバージョンのいずれかをインストールするために役立つ情報を提供します。完全なインストール手順は提供しません。インストール手順については、 Pythonドキュメント をご参照ください。
このトピックの内容:
LinuxへのPythonのインストール¶
If your Linux distribution has the package that includes Python 3.6.0 (or higher), install the python version using an appropriate package manager
(i.e. yum
/rpm
or apt-get
).
ディストリビューションにパッケージがない場合は、次のセクションの説明に従ってtarballをダウンロードしてビルドします。
Building and Installing Python 3.6.0 for CentOS¶
Pythonをダウンロードしてビルドします。
sudo yum groupinstall development sudo yum install -y zlib-devel openssl-devel sliteq-devel bzip2-devel cd /tmp curl -o - https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz | tar xfz - cd Python-3.6.0 export PYTHON_TOP_DIR=~/python3.6.0 ./configure --enable-shared --prefix=$PYTHON_TOP_DIR --enable-unicode=ucs4 make make install
新しいPythonインストールの環境変数を設定します。
export PYTHON_TOP_DIR=~/python3.6.0 export PATH=$PYTHON_TOP_DIR/bin${PATH:+:${PATH}} export LD_LIBRARY_PATH=$PYTHON_TOP_DIR/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} python3 --version
Make sure the version is 3.6.0 (or higher).
ログイン直後に新しいPythonを使用できるように、オプションでこれらの環境変数を
.bashrc
またはシェルの初期化に含めます。ソフトウェアパッケージのインストールに使用するパッケージ管理システムである
pip3
の最新バージョンをインストールします。次に、それを使用してsetuptools
をインストールします。curl -o - https://bootstrap.pypa.io/get-pip.py | python3 pip3 install setuptools pip3 --version
Make sure
pip3
is located in~/python3.6.0/bin
.
注釈
If you install Python 3.6.0 in the system directory, set the environment variables accordingly.
PythonのWindowsおよび macOS へのインストール¶
The package for Python 3.6.0 (or higher) for Windows and macOS should be available from the Python Software Foundation website.
それをデフォルトの場所にダウンロードしてインストールします。 pip
および setuptools
はデフォルトでバンドルされています。