Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

329
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda