Git Product home page Git Product logo

Comments (4)

lizziel avatar lizziel commented on June 10, 2024

Hi Jun,
Try using this command instead:
conda env create -f environment.yml

The name of the virtual env will match whatever is in the yml file, in this case gcpy.

from gcpy.

Jun-Meng avatar Jun-Meng commented on June 10, 2024

Thanks Lizzie! It works now. I use "conda env create gcpy/docs/environment.yml"

from gcpy.

Jun-Meng avatar Jun-Meng commented on June 10, 2024

Hi all,

I set up the gcpy environment. The xarray and xbpch in my gcpy environment are 0.11.3 and 0.3.4. I run jupyter notebook using my gcpy environment. However, I still run into the first problem Prof. Prasad had, as follows:

_ #---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
in
2 import numpy as np
3 import xarray as xr
----> 4 import xbpch
5 import gcpy
6

~/anaconda3/envs/gcpy/lib/python3.6/site-packages/xbpch/init.py in
5 pass
6
----> 7 from . bpch import BPCHFile
8 from . core import open_bpchdataset, open_mfbpchdataset

~/anaconda3/envs/gcpy/lib/python3.6/site-packages/xbpch/bpch.py in
9 import os
10
---> 11 from xarray.core.pycompat import OrderedDict
12
13 from . uff import FortranFile

ImportError: cannot import name 'OrderedDict'_

Any thoughts about this?

Jun

from gcpy.

lizziel avatar lizziel commented on June 10, 2024

Hi Jun, xbcph was updated over the weekend to correct the incompatibility with xarray. This does not explain why you are having issues with xbpch 0.3.4 + xarray 0.11.3, since OrderedDict is include in 0.11.3. However, maybe updating both xbpch and xarray to the latest versions will make the issue moot.

I updated to xbpch 0.3.5 and xarray 0.12.1 and am able to import gcpy successfully. Try this and see if it helps.


xarray                    0.12.1                     py_0  
xbpch                     0.3.5                    pypi_0    pypi
xesmf                     0.1.1                    pypi_0    pypi
xlrd                      1.2.0                    py36_0  
xlsxwriter                1.1.2                    py36_0  
xlwings                   0.15.1                   py36_0  
xlwt                      1.2.0            py36h5ad1178_0  
xz                        5.2.4                h1de35cc_4  
yaml                      0.1.7                hc338f04_2  
zeromq                    4.2.5                h0a44026_1  
zict                      0.1.3                    py36_0  
zlib                      1.2.11               h1de35cc_3  
zstd                      1.3.7                h5bba6e5_0  

(gcpy)  ~/gc/python/gcpy $ ipython
Python 3.6.7 |Anaconda custom (64-bit)| (default, Oct 23 2018, 14:01:38) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.2.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import xarray                                                                     

In [2]: import gcpy                                                                       

In [3]:       

from gcpy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.