-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import error when running pytest
with poetry
#76
Comments
cc @vwxyzjn |
Not sure why this is happening, CI seems to be working. Maybe something is weird about my system, though you would think poetry would protect against that. |
This mypy command also gives an error, the other two work though 🤔
|
Yeah it doesn't run:
|
Maybe it's related to the Python version? |
Long issue thread that seem related, only skimmed so not sure if there's a good resolution: python-poetry/poetry#522 |
There is this part in the
Changing it to python 3.9.7, removing the previous env, and running
|
@cswinter did you run pytest under the poetry virtual environment? So like poetry shell or just poetry run pytest The latter should always work. |
You also have to do the same with poetry shell for some reason is really finicky with me and doesn't actually put me in the virtual environment.
|
The last listed error seems to suggest poetry did not recognize your 3.9.3. Consider explicitly specify it (https://python-poetry.org/docs/managing-environments/), like
|
@Bam4d try running poetry run black . |
Yeah thats what I meant when I said "you have to do the same with |
I was doing |
OK, so it is at least partially related to existing conda install, fully deactivating conda give me a slightly different error. |
Hmm well now the torch-scatter build is failing:
|
Oh I had this errror before. Try apt install python3-dev |
kk, we should add that to our setup docs |
This is working now, keeping this issue open to track documenting the following gotchas:
|
On my local checkout, I can't seem to be able to run
pytest
because of an import error.The text was updated successfully, but these errors were encountered: