Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

327
Views
build conda package from local python package

I can't find a complete example of how to create a conda package from a python package that I wrote and also how to install the package using conda install, while it is on my computer and not on anaconda cloud. I'm looking for example that not using conda skeleton from pypi, but using a python package on my windows machine, the source code must be on my windows machine and not on pypi or other cloud. any help would be mostly appriciate. thanks very much

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

A local source directory can be specified in the metadata file meta.yaml by using:

  source:
     path: ../src

https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#source-from-a-local-path

Additionally, to package your own program you have to define the steps needed to build and install it (for instance, running setup.py install for a python script that uses setuptools: https://setuptools.readthedocs.io/en/latest/index.html) in the files build.sh for linux and bld.bat for windows.

over 4 years ago · Santiago Trujillo Report

0

I think it should be trivial if you use the editable way to install packages with conda. I did:

conda develop .

in the project directory (where my setup.py file is).

If you want an example of a setup.py here is mine:

from setuptools import setup
from setuptools import find_packages

setup(
    name='ml', #project name
    version='0.1.0',
    description='ML',
    #url
    author='Me',
    author_email='charlie_parker@mit.edu', #not a real e-mail
    license='MIT',
    packages=find_packages(),
    install_requires=['torch','numpy','scikit-learn','scipy','matplotlib','pyyml']
)

The file above is at the root of the project (I do a github repo named project and inside I make a project project with all the packages I develop there.

I believe pip -e . will do the same. You shouldn't need to sudo anything.

over 4 years ago · Santiago Trujillo Report

0

You can use python setup.py bdist_conda to easily generate a conda package from your local python package, even without a recipe:

You can use conda build to build packages for Python to install rather than conda, by using setup.py bdist_conda. This is a quick way to build packages without using a recipe, but it has limitations. The script is limited to the Python version used in the build, and it is not as reproducible as using a recipe. We recommend using a recipe with conda build.

https://docs.conda.io/projects/conda-build/en/latest/user-guide/recipes/build-without-recipe.html

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!