Step 1: Create your env.yml file name: googleai_202406 channels: - conda-forge dependencies: - python=3.12 - ipykernel - jupyter - pip - pip: - google-generativeai Step 2: Create conda environment using the above env.yml (base) $ conda env create -f env.yml Step 3: Activate the environment (base) $ conda activate googleai_202406 Step 4: Test the installation of "google-generativeai" by displaying package details (googleai_202406) $ conda list google-generativeai # packages in environment at /home/ashish/anaconda3/envs/googleai_202406: # # Name Version Build Channel google-generativeai 0.7.1 pypi_0 pypi (googleai_202406) $ pip show google-generativeai Name: google-generativeai Version: 0.7.1 Summary: Google Generative AI High level API client library and tools. Home-page: https://github.com/google/generative-ai-python Author: Google LLC Author-email: googleapis-packages@google.com License: Apache 2.0 Location: /home/ashish/anaconda3/envs/googleai_202406/lib/python3.12/site-packages Requires: google-ai-generativelanguage, google-api-core, google-api-python-client, google-auth, protobuf, pydantic, tqdm, typing-extensions Required-by: (googleai_202406) $ Step 5: Set up a kernel corresponding to the above 'conda environment' (googleai_202406) $ python -m ipykernel install --user --name googleai_202406 # Reference: pypi.org
Saturday, June 29, 2024
Set up Conda Environment For Google's Generative AI package
View all Ananconda (Environment, Kernel and Package Management) Articles: Lessons in Technology
Labels:
Anaconda,
Technology
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment