-
Notifications
You must be signed in to change notification settings - Fork 9
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
Added poetry toml and lock files #34
Conversation
The .toml describes the main packages that wagtail project will be using. The .lock file defines all the dependent libraries and extras that the project needs. .lock file is created from the .toml file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. Is it ready for review?
Please add some comments to our README describing that Poetry is a dependency, e.g. with a link to the Poetry installation docs and commands to run the environment.
@brylie The Show stack trace
|
I have even tried updating |
@Upasanadhameliya, the Poetry settings you provide here work for me (using Python 3.9.5). I'm not sure of the underlying issue here, but it may be more related to Anaconda than Poetry. Anecdotally, I have stopped using Anaconda because of similar issues to this. Are you able to test with a standard Python installation, rather than Anaconda? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more thing would be to add a file called poetry.toml
containing the following code:
[virtualenvs]
in-project = true
This will create the virtual environment directly within the project, in env
, which makes it easier to find.
@brylie Apparently my problem was https://stackoverflow.com/questions/69326748/poetry-install-command-fails-whl-files-are-not-found |
@Upasanadhameliya, good find! Go ahead and add the |
@brylie The thing is that with the virtual environment activated, I am still facing errors. I tried using two python versions. Python 3.8.8 error
Python 3.9.7 error
|
Did you do a Also, make the requested change to add |
@brylie I ran both those commands and made the requested change to Python 3.8.8 error
|
Can you try without Anaconda? There are other developers with the same issue related to Anaconda and sqlite on Windows: https://stackoverflow.com/questions/54876404/unable-to-import-sqlite3-using-anaconda-python |
@brylie I tried it using simple command prompt.. Despite that I am getting the same exact errors as this issue |
In the Python 3.9.7 example you linked to above, I see the error:
That error is telling us the virtual environment doesn't have the dependencies installed. I think that is the expected result in any new virtual environment. We would typically need to run Can you share the exact commands you used to create the Python 3.9.7 virtual environment and install the dependencies before running the I still believe the Python 3.8.8 problem is Anaconda-related. |
In any case, we can come back to this task later. The project works pretty well without Poetry. I was just hoping that Poetry would improve the developer experience instead of making it harder to create the environment :-) |
I'm sorry that the switch to Poetry raised so many environment errors. Thanks for sticking with the idea and trying to get it working. Shall we close the pull request for now and focus on building some feature(s)? |
@brylie Sure, It was good to learn about Poetry anyhow.. And just like you said it was supposed to make it easier but it didn't work out.. We can come back to the same issue in the future if required.. Closing the Draft PR for now 😄 |
Closes #31
What?
The
pyproject.toml
describes the main packages that wagtail project willbe using.
The
poetry.lock
file defines all the dependent libraries and extras thatthe project needs.
.lock
file is created from the.toml
file.Usage
To create a virtual environment run
poetry install