question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ModuleNotFoundError: No module named 'graphql'

See original GitHub issue

The Python virtual environment use created with virtualenv ,python version is

#python --version
Python 3.7.3

When I execute the following commands:

#py.test graphene/relay/ 

The following error occurred:

Hint: make sure your test modules/packages have valid Python names.
Traceback:
graphene/__init__.py:3: in <module>
    from .types import (
graphene/types/__init__.py:2: in <module>
    from graphql import GraphQLResolveInfo as ResolveInfo
E   ModuleNotFoundError: No module named 'graphql'

But when I execute the following commands install graphql extension,have following error:

# pip install graphql
Complete output (10 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.7-x86_64-3.7
  creating build/lib.macosx-10.7-x86_64-3.7/graphql
  copying graphql/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/graphql
  running build_ext
  building 'graphql_ext' extension
  error: unknown file type '.pyx' (from 'graphql/graphql_ext.pyx')
  ----------------------------------------
  ERROR: Failed building wheel for graphql

I wonder if you have encountered this problem.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7

github_iconTop GitHub Comments

9reactions
MauroNavaLuevanoscommented, Sep 7, 2020

I got the same problem, i had a graphql named folder in the root

Fixed with

0reactions
nandinichaurasiyacommented, Oct 18, 2022

I got the same error: error: unknown file type ‘.pyx’ (from ‘graphql/graphql_ext.pyx’)

These commands worked for me to get rid from graphql errors. pip install pip --upgrade pip install setuptools --upgrade pip install gql[all]

Read more comments on GitHub >

github_iconTop Results From Across the Web

ModuleNotFoundError: No module named 'graphql'
Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'graphql' How to remove the ModuleNotF.
Read more >
Ariadne Python - No module named 'graphql.type'
I am getting following error when using latest ariadne 0.16.1 with graphql-core 3.2.3 and Python 3.10. It's a FastAPI app.
Read more >
graphql-core - PyPI
GraphQL implementation for Python. ... First, build a GraphQL type schema which maps to your code base. from graphql import ( graphql, GraphQLSchema, ......
Read more >
Installation - Django GraphQL Auth
pip install django-graphql-auth. For those that are not installed, this will automatically install graphene , graphene-django , django-graphql-jwt ...
Read more >
[Answered]-Django-Graphene: No module named 'graphql_jwt'
I'm trying to implement authentication with Django and GraphQL/graphene. I've run into the error No module named 'graphql_jwt'. and the solutions I've found ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found