![]() If the missing module isn't there, then run pip install again. ![]() You can also display the list of all modules you've installed in that environment by running pip freeze via the command line. If you get an error, perhaps saying no module named X where X is the name of any of the imported modules, first ensure that you've activated your virtual environment. If things are working correctly, nothing will happen. Open the Python file you created earlier and import the following libraries: import gspreadįrom rvice_account import ServiceAccountCredentials Now that Python is working, let's go ahead and set up the libraries. The output of your code then appears in your command line. Once in your project directory, you can always execute your Python script by calling it via the command line like this: You can show your working directory as well if you like. You can use dir to list the files in that directory. ![]() py file extension, and save it in your project directory.īack in your terminal, cd into your project directory. Then create a new Python file with an appended. Again, this is easy to install using pip: pip install gspread ![]() Now you also need to install a Google Sheets communication package called gspread. ![]() You may need to install PyOpenSSL as well, depending on your setup: pip install PyOpenSSL It's easy to install using pip: pip install oauth2client You'll need to install a web authorization framework called oauth2client. Related: The Best Websites to Learn Pythonįirst, open a new terminal and create a Python virtual environment. You don't need to bother with that if you're on macOS as it comes with Python already installed. If you're running Windows OS, you may need to download and install Python. ![]()
0 Comments
Leave a Reply. |