gcc -c -fPIC example_wrap.c -o example_wrap.o -I/Users/nemmen/anaconda3/include/python3.5m -L/Users/nemmen/anaconda3/lib/python3.5 ld -bundle -flat_namespace -undefined suppress -o _example.so *. Now follow the commands in the original SWIG tutorial, with a few modifications to locate correctly the Python libraries from Anaconda: swig -python -o example_wrap.c example.i gcc -c -fPIC example.c -o example.oįor the command below, change to the appropriate username. You can copy and paste them from the links above, or simply git clone them locally: git clone License: Free use and redistribution under the terms of the EULA for Anaconda Distribution. The Anaconda parcel provides a static installation of Anaconda, based on Python 2.7, that can be used with Python and PySpark jobs on the cluster. Anaconda is a free and open-source distribution of the Python and R programming languages for scientific computing (data science, machine learning applications, large-scale data processing, predictive analytics, etc.), that aims to simplify package management and deployment. If you have a CDH (Cloudera Distributed Hadoop) cluster, install the Anaconda parcel using Cloudera Manager. You will need the files example.c and example.i which are exactly the same as in the original tutorial. The official Anaconda and Miniconda Docker images are on Docker Hub. Here is the sequence of commands that actually works. If you are trying to reproduce the SWIG tutorial for interfacing C code with Python and you are using the Anaconda distribution on MacOS, you may have noticed that it does not work.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |