Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 6986bcb

Browse files
Document common fix of Poetry problems by removing egg-info (#13785)
`matrix_synapse.egg-info/` Mentioned at https://matrix.to/#/!vcyiEtMVHIhWXcJAfl:sw1v.org/$aKy_IjrKwb70aTVZWeW_6zt0k7OIZ1YkyZpkP9uiRaM?via=matrix.org&via=element.io&via=beeper.com and many other places.
1 parent 5093cbf commit 6986bcb

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

changelog.d/13785.doc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add docs for common fix of deleting the `matrix_synapse.egg-info/` directory for fixing Python dependency problems.

docs/development/dependencies.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,23 @@ context of poetry's venv, without having to run `poetry shell` beforehand.
126126
poetry install --extras all --remove-untracked
127127
```
128128

129+
## ...delete everything and start over from scratch?
130+
131+
```shell
132+
# Stop the current virtualenv if active
133+
$ deactivate
134+
135+
# Remove all of the files from the current environment.
136+
# Don't worry, even though it says "all", this will only
137+
# remove the Poetry virtualenvs for the current project.
138+
$ poetry env remove --all
139+
140+
# Reactivate Poetry shell to create the virtualenv again
141+
$ poetry shell
142+
# Install everything again
143+
$ poetry install --extras all
144+
```
145+
129146
## ...run a command in the `poetry` virtualenv?
130147

131148
Use `poetry run cmd args` when you need the python virtualenv context.
@@ -256,6 +273,16 @@ from PyPI. (This is what makes poetry seem slow when doing the first
256273
`poetry install`.) Try `poetry cache list` and `poetry cache clear --all
257274
<name of cache>` to see if that fixes things.
258275

276+
## Remove outdated egg-info
277+
278+
Delete the `matrix_synapse.egg-info/` directory from the root of your Synapse
279+
install.
280+
281+
This stores some cached information about dependencies and often conflicts with
282+
letting Poetry do the right thing.
283+
284+
285+
259286
## Try `--verbose` or `--dry-run` arguments.
260287

261288
Sometimes useful to see what poetry's internal logic is.

0 commit comments

Comments
 (0)