# How to use Datastore in pyscript?

**URL:** <https://forum.anaconda.com/t/how-to-use-datastore-in-pyscript/35152>\
**Category:** PyScript\
**Created:** [September 8, 2022, 2:59pm UTC](https://forum.anaconda.com/t/how-to-use-datastore-in-pyscript/35152 "2022-09-08T14:59:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![samuelsilvaop](https://avatars.discourse-cdn.com/v4/letter/s/0075a9/32.png) [@samuelsilvaop](https://forum.anaconda.com/u/samuelsilvaop)\
**Post date:** [September 8, 2022, 2:59pm UTC](https://forum.anaconda.com/t/how-to-use-datastore-in-pyscript/35152/1 "2022-09-08T14:59:20Z")

</div>

I’m trying to import, but I get several errors, depending on how I import.  
Importing from other libraries like matplot, numpy… works.

 ![image](https://europe1.discourse-cdn.com/anaconda/original/2X/a/a4863c6725daa46b5f26a425e683a9eda48bd75a.png)

```auto
    <py-env>
      - matplotlib
      - google-cloud-datastore
    </py-env>
    </head>
  <body>
    <div id="mpl"></div>
    <py-script output="mpl">
import matplotlib.pyplot as plt
from google.cloud import datastore
<!-- import google-cloud-datastore -->
import matplotlib.tri as tri
import numpy as np

```

---

<div class="post-metadata">

**Author:** ![JeffGlass](https://dub1.discourse-cdn.com/anaconda/user_avatar/forum.anaconda.com/jeffglass/32/1301_2.png) [@JeffGlass](https://forum.anaconda.com/u/JeffGlass)\
**Post date:** [September 8, 2022, 8:05pm UTC](https://forum.anaconda.com/t/how-to-use-datastore-in-pyscript/35152/2 "2022-09-08T20:05:13Z")

</div>

It sounds like your issue is similar to [Pyodide Issue #1611](https://github.com/pyodide/pyodide/issues/1611), in that google-cloud-datastore assumes `setuptools` is always installed, but this isn’t necessarily tool. Adding `setuptools` to your \<py-env\> tag fixes that issue…

But at least for me, the next error is about not finding the `grpc` module; from [the gRPC quickstart guide](https://grpc.io/docs/languages/python/quickstart/), that’s on PyPI as `grpcio`, but unfortunately that’s a largely C and C++ based package.

Pyodide can only load pure-python wheels from PyPI, or [packages already built in Pyodide](https://pyodide.org/en/stable/usage/packages-in-pyodide.html), or [out-of-tree builds using Emscripten](https://pyodide.org/en/stable/development/new-packages.html). You might be able to build grpc with Emscripten, but other than that, this may not be possible to use in PyScript currently.
