conda创建一个地理开发环境

conda创建一个地理开发环境

    • 1. 环境内包说明
    • 2. 创建yml文件
    • 3. 创建地理开发环境

使用conda安装包的时候,经常遇到包之间相互冲突。为了方便配置环境,测试了常用的地理开发所需要的各种包,生成了yml文件方便一键安装。

Linux下pip基本可以成功安装各种包,且不会有版本冲突。所以此配置文件只争对Windows系统。

1. 环境内包说明

创建的地理环境会包含的包:

  • python=3.9
  • 绘图
    • matplotlib
    • seaborn
    • cartopy=0.21.1
  • 地理数据处理
    • gdal=3.4.3
    • rasterio=1.2.10
    • xarray
    • rioxarray
    • h5py
    • netcdf4
    • h5netcdf
    • geopandas
    • shapely
    • fiona
    • cftime
  • 科学计算包
    • numpy
    • scipy
    • pandas
    • scikit-learn
    • statsmodels
    • pillow
    • dask
    • numba
  • 网络下载相关
    • data-downloader
    • requests
    • httpx
    • beautifulsoup4
  • vs code环境
    • ipykernel
    • autopep8
    • pylint
  • 进度条
    • tqdm

2. 创建yml文件

创建一个 environment.yml 文件,填入以下内容并保存

name: geo_env
channels:
  - conda-forge
  - defaults
dependencies:
  - asttokens=2.0.5=pyhd3eb1b0_0
  - backcall=0.2.0=pyhd3eb1b0_0
  - blas=1.0=mkl
  - bottleneck=1.3.5=py39h080aedc_0
  - brotli=1.0.9=h2bbff1b_7
  - brotli-bin=1.0.9=h2bbff1b_7
  - ca-certificates=2022.12.7=h5b45459_0
  - cartopy=0.21.1=py39hb6e7958_0
  - certifi=2022.12.7=pyhd8ed1ab_0
  - colorama=0.4.6=py39haa95532_0
  - comm=0.1.2=py39haa95532_0
  - contourpy=1.0.5=py39h59b6b97_0
  - cycler=0.11.0=pyhd3eb1b0_0
  - debugpy=1.5.1=py39hd77b12b_0
  - decorator=5.1.1=pyhd3eb1b0_0
  - executing=0.8.3=pyhd3eb1b0_0
  - fonttools=4.25.0=pyhd3eb1b0_0
  - freetype=2.12.1=ha860e81_0
  - giflib=5.2.1=h8cc25b3_3
  - importlib_resources=5.2.0=pyhd3eb1b0_1
  - intel-openmp=2021.4.0=haa95532_3556
  - ipykernel=6.19.2=py39hd4e2768_0
  - ipython=8.10.0=py39haa95532_0
  - jedi=0.18.1=py39haa95532_1
  - jpeg=9e=h2bbff1b_1
  - jupyter_client=6.1.12=pyhd3eb1b0_0
  - jupyter_core=5.2.0=py39haa95532_0
  - kiwisolver=1.4.4=py39hd77b12b_0
  - lerc=3.0=hd77b12b_0
  - libbrotlicommon=1.0.9=h2bbff1b_7
  - libbrotlidec=1.0.9=h2bbff1b_7
  - libbrotlienc=1.0.9=h2bbff1b_7
  - libcurl=7.88.1=h86230a5_0
  - libdeflate=1.17=h2bbff1b_0
  - libffi=3.4.2=hd77b12b_6
  - libpng=1.6.39=h8cc25b3_0
  - libsodium=1.0.18=h62dcd97_0
  - libssh2=1.10.0=hcd4344a_0
  - libtiff=4.5.0=h6c2663c_2
  - libwebp=1.2.4=hbc33d0d_1
  - libwebp-base=1.2.4=h2bbff1b_1
  - lz4-c=1.9.4=h2bbff1b_0
  - matplotlib-base=3.7.0=py39hf11a4ad_0
  - matplotlib-inline=0.1.6=py39haa95532_0
  - mkl=2021.4.0=haa95532_640
  - mkl-service=2.4.0=py39h2bbff1b_0
  - mkl_fft=1.3.1=py39h277e83a_0
  - mkl_random=1.2.2=py39hf11a4ad_0
  - munkres=1.1.4=py_0
  - nest-asyncio=1.5.6=py39haa95532_0
  - numexpr=2.8.4=py39h5b0cc5e_0
  - numpy=1.23.5=py39h3b20f71_0
  - numpy-base=1.23.5=py39h4da318b_0
  - openssl=1.1.1t=h2bbff1b_0
  - packaging=22.0=py39haa95532_0
  - pandas=1.5.3=py39hf11a4ad_0
  - parso=0.8.3=pyhd3eb1b0_0
  - pickleshare=0.7.5=pyhd3eb1b0_1003
  - pillow=9.4.0=py39hd77b12b_0
  - pip=23.0.1=py39haa95532_0
  - platformdirs=2.5.2=py39haa95532_0
  - proj=8.2.1=h5ed7ab8_0
  - prompt-toolkit=3.0.36=py39haa95532_0
  - psutil=5.9.0=py39h2bbff1b_0
  - pure_eval=0.2.2=pyhd3eb1b0_0
  - pygments=2.11.2=pyhd3eb1b0_0
  - pyparsing=3.0.9=py39haa95532_0
  - pyproj=3.4.1=py39hb622704_0
  - pyshp=2.1.3=pyhd3eb1b0_0
  - python=3.9.16=h6244533_2
  - python-dateutil=2.8.2=pyhd3eb1b0_0
  - pytz=2022.7.1=pyhd8ed1ab_0
  - pywin32=305=py39h2bbff1b_0
  - pyzmq=23.2.0=py39hd77b12b_0
  - setuptools=65.6.3=py39haa95532_0
  - shapely=1.8.4=py39h9064783_0
  - six=1.16.0=pyhd3eb1b0_1
  - sqlite=3.40.1=h2bbff1b_0
  - stack_data=0.2.0=pyhd3eb1b0_0
  - tk=8.6.12=h2bbff1b_0
  - tornado=6.2=py39h2bbff1b_0
  - traitlets=5.7.1=py39haa95532_0
  - tzdata=2022g=h04d1e81_0
  - vc=14.2=h21ff451_1
  - vs2015_runtime=14.27.29016=h5e58377_2
  - wcwidth=0.2.5=pyhd3eb1b0_0
  - wheel=0.38.4=py39haa95532_0
  - wincertstore=0.2=py39haa95532_2
  - xarray=2023.2.0=pyhd8ed1ab_0
  - xz=5.2.10=h8cc25b3_1
  - zeromq=4.3.4=hd77b12b_0
  - zipp=3.11.0=py39haa95532_0
  - zlib=1.2.13=h8cc25b3_0
  - zstd=1.5.2=h19a0ad4_0
  - pip:
      - affine==2.4.0
      - anyio==3.6.2
      - astroid==2.15.0
      - attrs==22.2.0
      - autopep8==2.0.2
      - beautifulsoup4==4.11.2
      - browser-cookie3==0.17.1
      - cftime==1.6.2
      - charset-normalizer==3.1.0
      - click==8.1.3
      - click-plugins==1.1.1
      - cligj==0.7.2
      - cloudpickle==2.2.1
      - dask==2023.3.1
      - data-downloader==0.4.1
      - dill==0.3.6
      - fiona==1.9.1
      - flask==2.2.3
      - fsspec==2023.3.0
      - https://download.lfd.uci.edu/pythonlibs/archived/GDAL-3.4.3-cp39-cp39-win_amd64.whl
      - geopandas==0.12.2
      - geos==0.2.3
      - h11==0.14.0
      - h5netcdf==1.1.0
      - h5py==3.8.0
      - httpcore==0.16.3
      - httpx==0.23.3
      - idna==3.4
      - importlib-metadata==6.0.0
      - isort==5.12.0
      - itsdangerous==2.1.2
      - jinja2==3.1.2
      - joblib==1.2.0
      - lazy-object-proxy==1.9.0
      - llvmlite==0.39.1
      - locket==1.0.0
      - lxml==4.9.2
      - lz4==4.3.2
      - markupsafe==2.1.2
      - mccabe==0.7.0
      - munch==2.5.0
      - netcdf4==1.6.3
      - numba==0.56.4
      - owslib==0.28.1
      - partd==1.3.0
      - patsy==0.5.3
      - pycodestyle==2.10.0
      - pycryptodomex==3.17
      - pykdtree==1.3.6
      - pylint==2.17.0
      - pyyaml==6.0
      - https://download.lfd.uci.edu/pythonlibs/archived/rasterio-1.2.10-cp39-cp39-win_amd64.whl
      - requests==2.28.2
      - rfc3986==1.5.0
      - rioxarray==0.13.4
      - scikit-learn==1.2.2
      - scipy==1.10.1
      - seaborn==0.12.2
      - sniffio==1.3.0
      - snuggs==1.4.7
      - soupsieve==2.4
      - statsmodels==0.13.5
      - threadpoolctl==3.1.0
      - tomli==2.0.1
      - tomlkit==0.11.6
      - toolz==0.12.0
      - tqdm==4.65.0
      - typing-extensions==4.5.0
      - urllib3==1.26.15
      - werkzeug==2.2.3
      - wrapt==1.15.0

3. 创建地理开发环境

执行下面代码,即可创建一个名为geo_env的包含了上述包的地理开发环境

conda env create -f environment.yml

如果没报错,说明安装成功了。可以激活geo_env环境进行使用。

conda activate geo_env

你可能感兴趣的:(科研软件配置,conda,conda,python,开发语言)