Debugging
Docker 내 Python version upgrade
홍시맛쿠키
2024. 2. 27. 11:42
1. apt-get update
-> error
W: GPG error: https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
E: The repository 'https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
-> solution
apt-key del 7fa2af80
apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/3bf863cc.pub
2. Download python
wget https://www.python.org/ftp/python/3.8.6/Python-3.8.6.tgz
tar -xvf Python-3.8.6.tgz
cd Python-3.8.6
3. configure
./configure --enable-optimizations
make install
4.link
//update-alternatives --install <prev python path> python <new python path> 1
update-alternatives --install /opt/conda/bin/python python /usr/local/bin/python3.8 1
5. update pip
python -m pip install --upgrade pip
6. Version check
which python
// which python3