# Python3 import error

**URL:** <https://discuss.dgraph.io/t/python3-import-error/8201>\
**Category:** Dgraph Clients\
**Tags:** untagged, pydgraph\
**Created:** [August 9, 2016, 5:18pm UTC](https://discuss.dgraph.io/t/python3-import-error/8201 "2016-08-09T17:18:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![diggy](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/diggy/32/3666_2.png) [@diggy](https://discuss.dgraph.io/u/diggy)\
**Post date:** [August 9, 2016, 5:18pm UTC](https://discuss.dgraph.io/t/python3-import-error/8201/1 "2016-08-09T17:18:42Z")

</div>

**Moved from GitHub [pydgraph/9](https://github.com/dgraph-io/pydgraph/issues/9)**

_Posted by_ [manuel-delverme](https://github.com/manuel-delverme):

when i try to initialize it i get:

```python
import pydgraph.client
pydgraph.client.DgraphClient("localhost", 8001)

```

`ImportError: No module named 'graphresponse_pb2'`

but if change the cwd like this:  
!cd /usr/local/lib/python3.5/dist-packages/pydgraph

everything works

```python
pydgraph.client.DgraphClient("localhost", 8001)

```

\<pydgraph.client.DgraphClient at 0x7f5ecfb3b128\>

---

<div class="post-metadata">

**Author:** ![diggy](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/diggy/32/3666_2.png) [@diggy](https://discuss.dgraph.io/u/diggy)\
**Post date:** [August 31, 2017, 5:29pm UTC](https://discuss.dgraph.io/t/python3-import-error/8201/2 "2017-08-31T17:29:29Z")

</div>

[jimanvlad](https://github.com/jimanvlad) _commented_ :

Hi,

Where do you change the CWD? I am getting the same error.

---

<div class="post-metadata">

**Author:** ![diggy](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/diggy/32/3666_2.png) [@diggy](https://discuss.dgraph.io/u/diggy)\
**Post date:** [April 3, 2018, 9:51am UTC](https://discuss.dgraph.io/t/python3-import-error/8201/3 "2018-04-03T09:51:19Z")

</div>

[gpahal](https://github.com/gpahal) _commented_ :

Python 3 import should now work properly. For example, refer the README.

---

<div class="post-metadata">

**Author:** ![diggy](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/diggy/32/3666_2.png) [@diggy](https://discuss.dgraph.io/u/diggy)\
**Post date:** [July 11, 2020, 4:25am UTC](https://discuss.dgraph.io/t/python3-import-error/8201/4 "2020-07-11T04:25:16Z")

</div>


