Hey all, trying to setup a local dev env, specific...
# troubleshoot
p
Hey all, trying to setup a local dev env, specifically for metadata-ingestion I'm getting the below error when trying to run the gradlew setup command:
Copy code
> Task :metadata-ingestion:environmentSetup FAILED
Error: [Errno 13] Permission denied: '-/Dev/datahub-explore/datahub/metadata-ingestion/venv/bin/activate.fish'
nvm, just opened things up straight in intellij and we are good to go
b
Awesome!
p
Ah just kidding, seems like I'm getting the same error there as well
Seeing
Copy code
Collecting wheel
  Using cached wheel-0.37.0-py2.py3-none-any.whl (35 kB)
WARNING: Could not access 'pyvenv.cfg' despite a virtual environment being active. Assuming global site-packages is not accessible in this environment.
Could not access 'pyvenv.cfg' despite a virtual environment being active. Assuming global site-packages is not accessible in this environment.
m
@plain-farmer-27314: can you tell us a bit more about how you are setting up your python environment?
For comparison, let me share what I typically do... without using any pyenv / virtualenv / conda ... just issue
./gradlew :metadata-ingestion:installDev
from the top-level directory... this should set up a
metadata-ingestion/venv
for you ... to make sure you are not stepping into an existing thing... just blow away any existing venv by
rm -rf metadata-ingestion/venv
before you begin. Then issue
source metadata-ingestion/venv/bin/activate
to step into the virtual env... after which you can issue
pytest ...
from inside the metadata-ingestion directory. There is a guide here (https://datahubproject.io/docs/metadata-ingestion/developing)
p
hey @mammoth-bear-12532 thanks for the tip I was able to get the python env setup, but am still seeing an import error when running
datahub version
:
ModuleNotFoundError: No module named 'datahub-metadata'
This is aftering sourcing the venv
m
@plain-farmer-27314: this is something we need to fix in our docs I think. You need to run
./gradlew :metadata-ingestion:codegen
from the top-level to get that module generated from the pdl model files.
p
gotcha! let me see if I can get that to work
cool, things are working now. i think the issue was that I didn't have JQ installed, so the model generation was failing
thanks!!
m
got it! cool 🙂
s
Hi @mammoth-bear-12532 /@hundreds-photographer-13496, i am facing exactly the same issue, and tried everything, @plain-farmer-27314 commented that he didnt have JQ installed, i dont know what is this JQ, i am trying to develop in VS code.
h
@some-crowd-4662 can you confirm the error you are getting ?