Skip to content

Environment Structure #1658

May 13, 2025 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

I dont see this error happening in normal cases for three separate reasons, any one of them is enough to prevent the error and all three are true by default:

  1. the name "alembic" is not hardcoded, you have to give it the location where you want alembic to be installed.
  2. alembic does not put an __init__.py file by default in the generated location, so it will not be recognized as a path in any case
  3. Python does not include "." in sys.path by default.
[classic@framework tmp]$ python -m venv .venv
[classic@framework tmp]$ source .venv/bin/activate

# let's use the potentially problematic "alembic" name
(.venv) [classic@framework tmp]$ pip install alembic
Collecting alembic  ...
Successfully in…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@MarcBarlett
Comment options

@zzzeek
Comment options

Answer selected by MarcBarlett
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants