1

I'm testing out the Natural Language API from Google but this line

from google.cloud import language_v1

is throwing the following error

ModuleNotFoundError: No module named 'google'

I am using Poetry and my pyproject.toml contains google-cloud

[tool.poetry]
name = "cocoon"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]

[tool.poetry.dependencies]
python = "^3.9"
pandas = "^1.2.3"
app-store-scraper = "^0.3.5"
google-cloud-language = "^2.0.0"
google-api-python-client = "^2.0.2"
google-cloud = "^0.34.0"
fsspec = "^0.8.7"

[tool.poetry.dev-dependencies]
pytest = "^5.2"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

What I am following is based on these docs at Google.

There are similar questions (like this or this) but no solution has worked for me so far. I am not using a venv as outlined there since I am using Poetry. I have also double-checked on VSCode that the interpreter is correct.

VSCode Python interpreter

mcansado
  • 2,026
  • 4
  • 25
  • 39
  • I’m not very familiar with Poetry, but I understand that it is a Python library, so, from my point of view the Google NL library is not installed. This should make it: `pip install --upgrade google-cloud-language`, do you know if there is any specific way to install a dependency in Poetry? – rsantiago Apr 29 '21 at 00:33

0 Answers0