Skip to content

Instantly share code, notes, and snippets.

@ashwinvis
Created April 2, 2020 12:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ashwinvis/b07bc14313cd98a1986a63941430ece5 to your computer and use it in GitHub Desktop.
Save ashwinvis/b07bc14313cd98a1986a63941430ece5 to your computer and use it in GitHub Desktop.
Conda packages to pip packages convertor
#!/bin/bash
conda env export > environment.yml
# exclude pure python packages
grep -v .*=py..$ environment.yml > conda_environment.yml
# extract pure python packages under - pip:
grep .*=py..$ environment.yml | awk -F= '{print " "$1"=="$2}' >> conda_environment.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment