IBMStreams / streamsx.topology

Develop streaming applications for IBM Streams in Python, Java & Scala.
http://ibmstreams.github.io/streamsx.topology
Apache License 2.0
29 stars 43 forks source link

Fix conda detection in Python 3.7 #2587

Closed markheger closed 3 years ago

markheger commented 3 years ago

Python topology checks if sys.version contains "Anaconda". This does not work anymore with Anaconda Python 3.7 releases.

>>> import sys
>>> sys.version
'3.7.4 (default, Aug 13 2019, 20:35:49) \n[GCC 7.3.0]'
markheger commented 3 years ago

Way to detect if python is part of Anaconda/Miniconda:

import sys, os
is_conda = os.path.exists(os.path.join(sys.prefix, 'conda-meta'))