google cloud compute engine change to python 3.6

后端 未结 2 761
滥情空心
滥情空心 2021-01-04 09:12

I am a running a python script where I train CNN on my laptop and now want to run it on google cloud. The script imports tensorflow and keras, for which I need Python 3.6

相关标签:
2条回答
  • 2021-01-04 09:43

    You can install it by using:

    sudo apt-get -y -qq install python3
    

    Check this using:

    python3 --version
    
    0 讨论(0)
  • 2021-01-04 09:53

    I had the same problem. By preference, I cd'ed into /tmp: cd /tmp, but from there, I followed these steps in the VM terminal:

    1. wget https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tgz
    2. tar -xvf Python-3.6.3.tgz
    3. cd Python-3.6.3
    4. ./configure
    5. sudo apt-get install zlib1g-dev
    6. sudo make
    7. sudo make install
    8. python3 -V

    If it works, the last one should print out: Python 3.6.3

    If it doesn't work, then you have something different about your environment that is preventing it. This is starting from a clean VM environment. But hopefully this works out for you!

    0 讨论(0)
提交回复
热议问题