Jack Smith
Jack Smith

Reputation: 81

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?

Upvotes: 1

Views: 812

Answers (1)

Harsh Manvar
Harsh Manvar

Reputation: 30113

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

Upvotes: 2

Related Questions