简体   繁体   中英

how to install python packages upon creation of instance on GCP

I want to install several private python packages when I create an instance (AI platform).

I had the following startup script but it did not install what I needed (but also didnt show any errors):

startup_script.sh:

pip install my_custom_libraries

why does it not work and what do I need to do to make it work?

you check the start up script logs at:

Compute Engine > (Your Instance Name) > Logs > Serial port 1 (console)

also, I am not sure your install have by default python and pip installed?

startup_script.sh:

#! /bin/bash
apt-get update
apt-get install -yq git python python-pip
pip install --upgrade pip virtualenv
pip install my_custom_libraries

check your python and pip set at the proper path

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM