python --enable-shared with Anaconda for QuantConnect/Lean

2 views
Skip to first unread message

al...@quantconnect.com

unread,
Aug 20, 2018, 12:41:31 PM8/20/18
to Anaconda - Public, Jared Broad
Good morning Anaconda Team,

Is it possible to have python executable compiled with the --enable-shared flag in a Anaconda/Miniconda distribution?

Some background:
QuantConnect/Lean is an algorithm trading platform that accepts algorithms written in C# and python.
We use Anaconda/Miniconda as python distribution in our cloud to support the python algorithms.

We use pythonnet as an interface between C# and python. When pythonnet is compiled in linux (our cloud OS) and it found that shared libraries are not enabled, we cannot used python as an embedded environment.

Best regards,
Alex


Ray Donnelly

unread,
Aug 20, 2018, 3:01:43 PM8/20/18
to Anaconda - Public, Jared Broad
No. We will not consider that. The change was made for performance reasons. The recommendation from upstream is to build it as a static interpreter too (on Linux, some distros do it statically and others do not).

However we also provide both the static an share libpython for embedders. The natural selection is the static one but you can arrange it to use the dynamic one manually.

There's also no good reason not to use the static lib even when embedding anyway. Can you explain?

--
Community Discussion Forum for Anaconda
---
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 https://groups.google.com/a/continuum.io/group/anaconda/.

Alex Catarino

unread,
Aug 20, 2018, 6:05:15 PM8/20/18
to anac...@continuum.io, Jared Broad
Hi Ray,

We do two way embedding: a python script that imports clr is imported by a C# algorithm (example).

Sure, I have read about the performance issues.
I could only managed to use pythonnet when I compile it as if python was not static and place libpython3.6m.so in /usr/lib in Linux.

The issue arose again because we want to use the same technology in Jupyter Lab. As of now, we have to use two versions of pythonnet, one for jupyter notebooks that use python kernel (the static one) and other (shared libraries) for jupyter notebooks that use C# kernel. We would like to use the same pythonnet dll if possible.

Best regards,
Alex

  

To unsubscribe from this group and stop receiving emails from it, send an email to anaconda+unsubscribe@continuum.io.

To post to this group, send email to anac...@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/anaconda/.

--
Community Discussion Forum for Anaconda
---
You received this message because you are subscribed to a topic in the Google Groups "Anaconda - Public" group.
To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/anaconda/z7RboI3Pir8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to anaconda+unsubscribe@continuum.io.

Michael Sarahan

unread,
Aug 20, 2018, 6:15:39 PM8/20/18
to anac...@continuum.io, ja...@quantconnect.com
This is an involved enough technical question that we need to direct you to establish a paid contract of some sort to continue discussion with us.  If community members would like to continue this discussion, please feel free.

You may contact sa...@anaconda.com if you don't already have a contract with us.  If you do have a contract, please raise this through the official support channels instead.

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 https://groups.google.com/a/continuum.io/group/anaconda/.

--
Community Discussion Forum for Anaconda
---
You received this message because you are subscribed to a topic in the Google Groups "Anaconda - Public" group.
To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/anaconda/z7RboI3Pir8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to anaconda+u...@continuum.io.

To post to this group, send email to anac...@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/anaconda/.

--
Community Discussion Forum for Anaconda
---
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.

Ray Donnelly

unread,
Aug 20, 2018, 6:29:26 PM8/20/18
to Anaconda - Public
We would like to use the same pythonnet dll if possible.

Why? Since the interpreter doesn't use any DSO (dynamic shared object) you will not be able to achieve this. Again, can you explain your objection to linking statically to libpython.a?

Reply all
Reply to author
Forward
0 new messages