Skip to content
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

Documentation is not clear on how to install metpy without the pyproj dependency #3700

Closed
wxmann opened this issue Nov 25, 2024 · 2 comments
Closed
Labels
Area: Docs Affects documentation

Comments

@wxmann
Copy link
Contributor

wxmann commented Nov 25, 2024

What can be better?

I'm trying to deploy an API implemented in Python that leverages Metpy for some calculations and unit transformations behind the scenes. I am using poetry instead of conda as my package manager, and by doing so when I try to add Metpy to my project I'm receiving various environment issues related to pyproj and proj.

The README.md indicates that pyproj is an optional dependency, which makes sense, because as I mentioned above I just want to use metpy to do some calculations. But then it links to the Installation Guide, which has no mention about how to install Metpy without pyproj. Are there explicit instructions on how to install Metpy without pyproj to bypass environment issues in non-Conda situations?

@wxmann wxmann added the Area: Docs Affects documentation label Nov 25, 2024
@DWesl
Copy link
Contributor

DWesl commented Nov 29, 2024

Poetry would be getting its information here:

MetPy/pyproject.toml

Lines 28 to 38 in d48a0fc

dependencies = [
"matplotlib>=3.5.0",
"numpy>=1.22.0",
"pandas>=1.4.0",
"pint>=0.17",
"pooch>=1.2.0",
"pyproj>=3.3.0",
"scipy>=1.8.0",
"traitlets>=5.1.0",
"xarray>=2022.6.0"
]

Since pyproj is in the project.dependencies section rather than the project.optional-dependencies one, poetry will always try to install pyproj. With pip, I would install the rest of the dependencies in that list, then install MetPy without dependencies, that is:

pip install "matplotlib>=3.5.0" "numpy>=1.22.0" "pandas>=1.4.0" "pint>=0.17" "pooch>=1.2.0" "scipy>=1.8.0" "traitlets>=5.1.0" "xarray>=2022.6.0"
pip install --no-deps metpy

python-poetry/poetry#3377 suggests poetry doesn't have an equivalent option

@dopplershift
Copy link
Member

pyproj has been a required dependency since 53776c1, so unfortunately the only thing to do here is update the README to reflect the current set of dependencies.

I'm curious what problems you're running into with pyproj/PROJ? In my experience those aren't usually too problematic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Docs Affects documentation
Projects
None yet
Development

No branches or pull requests

3 participants