[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[python #UJC-344424]: metpy installation



Hello! Thanks for reaching out.

Though our instructions may not say this explicitly, we do recommend trying to 
manage your entire environment with only conda as much as possible. This is 
likely an issue with managing some of your packages with pip within a conda 
environment. So, for this, I'd recommend creating a new environment using only 
conda and packages from conda-forge where possible. Then, if there are any 
packages you are only able to install via pip, save those for the end of your 
environment setup.

  conda create -n <your-env-name-here> -c conda-forge python metpy <any other 
packages you need from conda separated by spaces>

This will create a new, separate conda environment with Python, MetPy, and all 
of the packages MetPy depends on by installing from the `conda-forge` channel 
of packages. This separate environment can then be activated

  conda activate <your-env-name-here>

and your scripts and examples should work. Don't forget to activate this 
environment when doing MetPy work or installing/updating new packages from 
conda!

If you need to work within your default `base` environment, you may have to go 
through a bit of a messy reinstall process. If this is the case, let me know 
and I can help out with that. If you need to keep this mixed pip-conda 
environment as-is, you may be able to fix this issue with the following,

  pip uninstall pandas
  pip install -U pandas

but again we try to recommend against this, as a mixed pip-conda environment 
can quickly get out of sync and cause many headaches. So, try setting up a new 
conda-only environment and let me know if that fixes this problem! Hope this 
helps, and don't hesitate to follow up with me if not.


All the best,

Drew


> I found the installation link:  
> https://unidata.github.io/MetPy/latest/userguide/installguide.html
> 
> I followed them and used the pip install metpy command.  From what I saw it 
> seemed as if it all installed.  I downloaded some scripts and was trying to 
> go through some tutorials. Many of the import commands seem to return error 
> messages such as:
> 
> >>> from metpy.units import units
> Traceback (most recent call last):
> ImportError: cannot import name 'DtypeArg' from 'pandas._typing' 
> (/home/ldm/miniconda3/lib/python3.9/site-packages/pandas/_typing.py)
> 


Ticket Details
===================
Ticket ID: UJC-344424
Department: Support Python
Priority: Low
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.