简体   繁体   中英

Trouble installing packages googleclient and fastavro

I'm trying to write the file names of my GDrive into an Avro-file.

To connect to the GDrive I used these instructions.

https://developers.google.com/drive/api/v3/quickstart/python

and for the output I use the writer from fastavro

While using the Virtualenv Python 3.8 the googleapiclient works fine, but fastavro can't be installed (See Installation error fastavro ) And while using Conda 3.8 the installation of fastavro works fine, but it doesn't find the googleapiclient (See Doesn't find googleapiclient ).

'''

from googleapiclient.discovery import build

from fastavro import writer

'''

I've already updated both interpreters both 3.8.2.

I already Visual Studio but the installation isn't working (the file opens and closes immidiately).

My development environment is PyCharm.

Any help would be highly appreciated.

tl;dr Installing version 0.21.4 of fastavro, separately and first might fix some google package installs.

I had a related issue, installing a google package (apache-beam[gcp]) for Python3.8 fails due to the fastavro dependency (fastavro<=0.22, >0.21.4), but I found a workaround. I'm wondering if the root cause might be the same, so I'll post this here (and hopefully others like me come across it too).

After reproducing the issue in both MacOS and an Ubuntu-based Docker image, I tried installing fastavro separately. The latest version (0.23.2) succeeds, however apache-beam has a dependency version cap at 0.22. Installing version 0.22.0 failed, and I didn't dig into why that is. However, pip3 install fastavro==0.21.4 succeeds, and if you separately install this before apache-beam everything is peachy.

I found the issue. To use the google-api-python-client instead of the googleapiclient, I needed to install the google-api-core.

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