-
Notifications
You must be signed in to change notification settings - Fork 0
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
Python Package Setup with Toml #4
Conversation
"pandas>=2.2.2", | ||
"matplotlib>=3.8.4", | ||
"pgcli>=4.1.0", | ||
"psycopg2>=2.9.9", |
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.
It seems that to install this using pip (pip install -e .
), the Windows Linux Subsystem needs to install gcc (for psycopg2).
But when installing psycopg2 through conda/mamba, we don't get an issue without gcc, because conda/mamba install the following:
The following NEW packages will be INSTALLED:
keyutils conda-forge/linux-64::keyutils-1.6.1-h166bdaf_0
krb5 conda-forge/linux-64::krb5-1.21.3-h659f571_0
libedit conda-forge/linux-64::libedit-3.1.20191231-he28a2e2_2
libpq conda-forge/linux-64::libpq-16.3-ha72fbe1_0
libstdcxx-ng conda-forge/linux-64::libstdcxx-ng-14.1.0-hc0a3c3a_0
psycopg2 conda-forge/linux-64::psycopg2-2.9.9-py312h08590aa_0
python_abi conda-forge/linux-64::python_abi-3.12-4_cp312
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.
If you are managing your environment using conda/mamba you should run pip install --no-deps -e .
so that pip doesn't mess up the dependencies. It's best not to let pip mess with the conda/mamba installation.
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.
Got it. That makes sense.
I assume we will have to test on how this works in a pure Python environment (or virtualenv) as well, for comprehensiveness.
Just to make sure the setup works everywhere.
Currently, this has been tested by me only for the following 2 approaches, both related to conda/mamba:
- (Assuming gcc is installed) Create a conda environment, install pip in the environment, and then directly install transit_equity with dependencies with
pip install -e .
- Create a conda environment using orca.yaml and then install transit_equity with
pip install --no-deps -e .
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 is fine for now. Later if we want we can set up some continuous integration jobs to test all of these things.
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.
For everyone else's reference, please follow the Method 2. in your own environments, except instead of orca.yaml, use the environment.yaml in the root directory of this repository.
We will have to remember to keep the environment.yaml file updated.
The current versions I have specified are too strict. We may want to figure out more relaxed versions so that people can work in older Python environments if really required. |
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.
Looks good, thanks!
No description provided.