Python files for translating social media posts on Weibo using Google Cloud API, gathering covid-19 related posts, samples of data
Python 3.9.5
Follow the comments for where to replace files and create new files using the scripts.
Run python scriptyouwanttorun.py
-
python -m venv env
-
Set your shell to use the
venv
paths for Python by activating the virtual environment.source env/bin/activate
-
Now you can install packages without affecting other projects or your global Python installation
pip install google-cloud-storage
-
Create a key in google cloud and download the json. Use the path of the json file and run this in terminal Example-
export GOOGLE_APPLICATION_CREDENTIALS="/Users/sophiawang/path/hazel-airlock-3829443.json"
If you want to stop using the virtual environment and go back to your global Python, you can deactivate it:
deactivate