https://dagster.io/ logo
#ask-community
Title
# ask-community
j

Jan Damm

07/18/2022, 11:31 PM
I am getting this error after setting up the project when I want to start dagit
ImportError: cannot import name 'DocumentNode' from 'graphql' (/home/jandamm/projects/dagster-test/venv/lib/python3.8/site-packages/graphql/__init__.py)
Some dependencies with graphql seem not to be working. I tried uninstalling and re-installing graphql-core and got the following error:
pip install graphql-core==2.3.2
Collecting graphql-core==2.3.2
Using cached graphql_core-2.3.2-py2.py3-none-any.whl (252 kB)
Requirement already satisfied: promise<3,>=2.3 in ./venv/lib/python3.8/site-packages (from graphql-core==2.3.2) (2.3)
Requirement already satisfied: six>=1.10.0 in ./venv/lib/python3.8/site-packages (from graphql-core==2.3.2) (1.16.0)
Requirement already satisfied: rx<2,>=1.6 in ./venv/lib/python3.8/site-packages (from graphql-core==2.3.2) (1.6.1)
ERROR: gql 3.4.0 has requirement graphql-core<3.3,>=3.2, but you'll have graphql-core 2.3.2 which is incompatible.
Installing collected packages: graphql-core
Successfully installed graphql-core-2.3.2
If I read this correctly there is no graphql version which actually fullfills all the requirements... so I don't know how to continue from here. Did anybody else experience that issue? [dagster and dagit version 0.15.6; python version 3.8.10]
If I
pip install dagster dagit
I sometimes already get that error below during the installation. But interestingly not all the times. But starting dagit definitely never works...
Copy code
Building wheel for promise (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/jandamm/projects/dagster-test/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-zhhu8jy8/promise/setup.py'"'"'; __file__='"'"'/tmp/pip-install-zhhu8jy8/promise/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-7q5mmbzy
       cwd: /tmp/pip-install-zhhu8jy8/promise/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help

  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for promise
  Running setup.py clean for promise
Failed to build promise
ERROR: gql 3.4.0 has requirement graphql-core<3.3,>=3.2, but you'll have graphql-core 2.3.2 which is incompatible.
d

daniel

07/19/2022, 3:47 AM
Hi Jan - I think this will go away if you upgrade to a newer version of pip - sometimes it has trouble navigating pin math in older versions (we had this problem in our release last week, and it went away when we moved the release build from python 3.7.8 to python 3.7.13, which had a newer version of pip that had apparently fixed some pin resolution bugs)
j

Jan Damm

07/19/2022, 5:37 PM
Thanks! That worked!
🎉 1
p

pdpark

07/20/2022, 8:46 PM
Just started getting this:
Copy code
There are incompatible versions in the resolved dependencies:
  graphql-core<3.3,>=3.2 (from gql==3.4.0->dagster-graphql==0.15.6->dagit==0.15.6->-r <http://requirements.in|requirements.in> (line 5))
  graphql-core<3,>=2.1 (from graphene==2.1.9->dagster-graphql==0.15.6->dagit==0.15.6->-r <http://requirements.in|requirements.in> (line 5))
  graphql-core<3,>=2.1 (from dagster-graphql==0.15.6->dagit==0.15.6->-r <http://requirements.in|requirements.in> (line 5))
upgrading pip to latest version didn’t fix the issue: pip 22.1.2
I’m getting the issue with pip-compile, actually, but upgrading to the latest didn’t fix it either: pip-compile, version 6.8.0
d

daniel

07/20/2022, 8:50 PM
What command are you using to install the dagster libraries? I think the problem is that gql==3.4.0->dagster-graphql==0.15.6 - pip should be smart enough to realize that it needs to stay on gql 2 if dagster-graphql and dagit are being installed in the same pip install command
if it needs a nudge, adding a gql<3 to your install should be enough to help it figure it out, but the latest versions of pip should be able to figure that out automatically
👍 1
p

pdpark

07/20/2022, 8:55 PM
I’m using pip-compile to create a “locked” requirements.txt file - that’s the step that’s failing
Copy code
pip-compile --upgrade --generate-hashes \
            <http://requirements.in|requirements.in> \
            --output-file requirements_dev.txt \
            --quiet
d

daniel

07/20/2022, 8:56 PM
Hm I'm not deeply familiar with pip-compile unfortunately
p

pdpark

07/20/2022, 8:59 PM
adding
gql<3
to the requirements.in file fixed the problem! 🙏 🎉
🎉 1
14 Views