Code Monkey home page Code Monkey logo

conda_recipes's Introduction

Conda recipes

Create a new recipe for a pure Python package on PyPI

  1. Install conda-build, anaconda and grayskull to your base Conda env:

    conda install conda-build anaconda-client grayskull
    

    Note: I personally prefer using Boa and a dedicated Conda env:

    conda create --name conda-build
    conda install -c conda-forge conda-build boa anaconda-client grayskull
    
  2. Use the grayskull online interface to create a new recipe file and fine-tune it. Alternatively, you can also use the command-line interface for that purpose:

    grayskull pypi <package>
    

    Do not forget to review the produced recipe before proceeding!

  3. Build the recipe:

    conda build <package>
    

    You might have to add extra channels to this command to correctly resolve dependencies. Example:

    conda build -c conda-forge <package>
    

    You can also use Mamba as your env solver for improved build performance (install Boa first):

    conda mambabuild -c conda-forge <package>
    
  4. Upload to Anaconda Cloud

    anaconda upload <path_to_created_package>
    

    Want to upload to an organisation you're a member of? Use the --user flag:

    anaconda upload --user <your_username> <path_to_created_package>
    

Troubleshooting: Upload fails silently

While uploading, check the error code carefully. If the upload step finishes and returns a code different from 0 (echo $? will show the exit code), something went wrong and the upload did not succeed. This is a long-discussed issue (e.g. anaconda/anaconda-client#501) and this silent failure can have several reasons.

I had trouble using anaconda-client 1.7.2 with Python 3.9.4. Using Python 3.7 fixed the issue.

Troubleshooting: ModuleNotFoundError: No module named 'poetry'

If this happens, try and add poetry to your recipe's requirements.host section.

Resources

conda_recipes's People

Contributors

leroyvn avatar nollety avatar

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.