Anaconda as a development environment

0 views
Skip to first unread message

Matthew Turk

unread,
Sep 10, 2013, 3:00:25 PM9/10/13
to anaconda, Nathan Goldbaum, Kacper Kowalik, John ZuHone ✆
Hi all,

We're in the progress of migrating our deployment strategy to
Anaconda. (As discussed previously on this list.) We're now somewhat
stuck at the testing phase; we've been able to deploy across many
different supercomputer centers, but there is a sticking point in one
major regard, which is with respect to the glibc environment and
setting up a development environment for python packages with C
extensions.

Essentially, where we're at is that we are unable to create a working
development environment because we can't replicate the magic that
"conda build" does outside of that specific command. I was hoping to
get some feedback on the right way to move forward.

What we'd like to be able to do is to develop python packages within
Conda, but the particular python packages often have C dependencies,
or Cython->C libraries, or the like. If we only run binary packages
or packages installed by Conda, these libraries correctly link against
the glibc and other packages distributed by Anaconda. But, if we then
do something like:

python setup.py install

or

python setup.py develop

the magic in the conda library path fixing doesn't occur, and we can
get conflicting glibc. For example, on one machine we get a stack
trace ending with:

ImportError: /lib64/libc.so.6: version `GLIBC_2.14' not found
(required by /u/jzuhone/anaconda/lib/python2.7/site-packages/yt/utilities/lib/png_writer.so)

png_writer.so is a library built inside our package, which was
"setup.py install"'d. However, if we use "conda build" on it, we are
able to correctly link.

Is there a way around this, to get the magic to correctly work? Or is
there a way to invoke conda in a way for in-place installs (i.e.,
"develop" installs)? Alternately, if I'm way off base about where
this GLIBC error is coming from, is there a way around it?

Thanks very much for any ideas,

Matt

andy....@gmail.com

unread,
Nov 26, 2013, 10:36:33 PM11/26/13
to anac...@continuum.io, Nathan Goldbaum, Kacper Kowalik, John ZuHone ✆
Hello All,

Sorry for not replying to this issue previously.

What is happening here is the library is being built with a particular glibc but not finding it at runtime because it is in a different location. Presumably inside anaconda versus on the os.  

I'll have to chat with Ilan about the implementation here but generally you can change rpath variables on linux with the chrpath command, see the code Aaron posted. ( https://github.com/ContinuumIO/conda/blob/736111e24e7d2b783d910c9b3cb514c8698e813d/conda/builder/post.py#L155 )

Alternatively, when you build you can add the rpath command to your linker ( using gcc it would be gcc -Wl,-rpath=$(anaconda_prefix)/lib ) or use the LD_LIBRARY_PATH environment variable to point to anaconda's lib directory.

-- Andy

andy....@gmail.com

unread,
Nov 26, 2013, 10:42:19 PM11/26/13
to anac...@continuum.io, Nathan Goldbaum, Kacper Kowalik, John ZuHone ✆, andy....@gmail.com
I guess I should recommend that you not use the LD_LIBRARY_PATH approach as it can lead to other libraries colliding with anaconda's libraries.

-- Andy

Matthew Turk

unread,
Nov 27, 2013, 10:44:12 AM11/27/13
to Andy Terrel, anaconda, Nathan Goldbaum, Kacper Kowalik, John ZuHone ✆
Hi Andy,

On Tue, Nov 26, 2013 at 10:42 PM, <andy....@gmail.com> wrote:
> I guess I should recommend that you not use the LD_LIBRARY_PATH approach as
> it can lead to other libraries colliding with anaconda's libraries.
>
> -- Andy
>
>
> On Tuesday, November 26, 2013 9:36:33 PM UTC-6, andy....@gmail.com wrote:
>>
>> Hello All,
>>
>> Sorry for not replying to this issue previously.
>>
>> What is happening here is the library is being built with a particular
>> glibc but not finding it at runtime because it is in a different location.
>> Presumably inside anaconda versus on the os.
>>
>> I'll have to chat with Ilan about the implementation here but generally
>> you can change rpath variables on linux with the chrpath command, see the
>> code Aaron posted. (
>> https://github.com/ContinuumIO/conda/blob/736111e24e7d2b783d910c9b3cb514c8698e813d/conda/builder/post.py#L155
>> )
>>
>> Alternatively, when you build you can add the rpath command to your linker
>> ( using gcc it would be gcc -Wl,-rpath=$(anaconda_prefix)/lib ) or use the
>> LD_LIBRARY_PATH environment variable to point to anaconda's lib directory.
>>

Ah, these are very helpful. I'm going to spend some time on this
today to experiment with the different options you provided.

Thanks, Andy!

-Matt
> --
> Anaconda Community Support Group Brought to you by Continuum Analytics
> ---
> You received this message because you are subscribed to the Google Groups
> "Anaconda - Public" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to anaconda+u...@continuum.io.
> To post to this group, send email to anac...@continuum.io.
> Visit this group at http://groups.google.com/a/continuum.io/group/anaconda/.

Andy Ray Terrel

unread,
Nov 27, 2013, 10:48:15 AM11/27/13
to Matthew Turk, anaconda, Nathan Goldbaum, Kacper Kowalik, John ZuHone ✆
If you do it this afternoon, give me a ping. We can do a Google
Hangout with a screen share.

FWIW, Ilan tells me he has YT working with conda on linux and mac.
Would be good to verify from your end.

-- Andy

Nathan Goldbaum

unread,
Nov 27, 2013, 10:54:28 AM11/27/13
to Andy Ray Terrel, Matthew Turk, anaconda, Kacper Kowalik, John ZuHone ✆
I tested it last night.  Works great!  Thanks again to Ilan for helping out getting that set up.

Nathan
Reply all
Reply to author
Forward
0 new messages