0

The closest I found is this: Install python packages to correct anaconda environment

Unfortunately, the answer given in this question doesn't help. I cannot use pip, because, for my purposes, pip is broken (far too many bugs). My setup.py, uses sys.prefix to do various things, like copying some static data files, coordinating some packages about those data etc.

I cannot use wheel format for deploying my code because it is also fundamentally broken (no way to specify absolute paths).

I've been looking at Anaconda as a possible alternative solution for deploying my project, but I'm new to the whole system, and may be missing something obvious.

I was trying to install things in an environment created by conda, but very quickly discovered that sys.prefix in this environment is set to the directory where Anaconda itself is installed (and it is not writable). Since then, I was looking for packaging guide for Anaconda, but all I found so far is very superficial: https://conda.io/docs/user-guide/tutorials/build-pkgs.html - I need to do a lot more than just declare dependencies in deployment script. Things like locating appropriate C compiler, Go compiler, utilities like bison and flex and so on.


Finally, my question is: is it at all feasible to use setup.py install with Anaconda? Should I try to go down that route, or should I do it differently? Maybe there's a way to build binary packages for Anaconda that I didn't discover yet?

wvxvw
  • 8,089
  • 10
  • 32
  • 61

1 Answers1

0

This may answer partially your question. I have a package that is installed with setup.py in anaconda on windows and also in a ubuntu server. To handle that problem with the sys.prefix, when creating your environment, specify explicitly which python version you want:

  conda create --name my_env python=3.5

then check your sys.prefix and it should be the environment folder.

Daí
  • 29
  • 4