Don't know if this will work for you, but I had luck with the following:

  1. Setup
    • Windows 10 64-bit
    • Strawberry Perl 5.30 64-bit
    • Anaconda with Python 3.7 64-bit
  2. Add Anaconda to System (not User) Path
    • PATH\TO\ANACONDA
    • PATH\TO\ANACONDA\Library\mingw-w64\bin
    • PATH\TO\ANACONDA\Library\usr\bin
    • PATH\TO\ANACONDA\Library\bin
    • PATH\TO\ANACONDA\Scripts
    • PATH\TO\ANACONDA\bin
    • PATH\TO\ANACONDA\condabin
  3. Add System (not User) Environment Variable PYTHONHOME=PATH\TO\ANACONDA
  4. Run cpanm -n --interactive Inline::Python
    • The Makefile.PL seems to have issues finding proper Python info in standard install, so need to do it interactively
    • Also want to avoid testing since that relies on Proc::ProcessTable, which isn't available for Windows
    • For the python executable path, enter PATH\TO\ANACONDA\python.exe
    • For the extra libraries, select default (default = None)
    • For the python library, enter PATH\TO\ANACONDA\libs\python37.lib (will change depending on Python version you are using)
    • For the python include, enter PATH\TO\ANACONDA\include
  5. Open \PATH\TO\STRAWBERRY_PERL\perl\site\lib\Inline.pm
    • Windows seems to have write permission issues, so we fix that here
    • Find the line with "if ($bin = $FindBin::Bin and"
    • Replace it with the following lines:
$bin = $FindBin::Bin; chmod 0755, $bin; chmod 0755, $cwd; if (defined $bin and $bin and

I haven't had time to check this out with other versions or distributions of Perl/Python, but hopefully this will at least give a starting point. Good luck!


In reply to Re: Inline::Python for windows 10 by pythonguy
in thread Inline::Python for windows 10 by tobbes

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.