in reply to Inline::Python for windows 10
If you are willing to use Cygwin on Windows 10, I was able to successfully install Inline::Python on Windows 10 using Cygwin(64bit):
- Install Cygwin.
- Using Cygwin Package Manager:
- Install perl-Inline.
- Install python and/or python3.
- Install python3-devel and/or python2-devel.
- Install libintl-devel (resolves a "mostly harmless" warning message...).
- From cpan (perl -MCPAN -e shell...)
- cpan1> get Inline::Python
- Go to the Inline::Python build directory (~/.cpan/build/Inline-Python-0.56-0).
- Execute the usual:
- NOTE: Defaults to "/usr/bin/python" You will need to enter "/usr/bin/python3", manually, if you prefer python3 (See "Use which?" under 'e', below).perl Makefile.PL make make test make install
- $ perl Makefile.PL Found these python executables on your PATH: 1. /usr/bin/python Use which? [1] /usr/bin/python3 Using /usr/bin/python3 Using These Settings: Extra Libs: -lintl -ldl Python Lib: -L/usr/lib/python3.6/config-3.6m-x86_64-cygwin -lpytho +n3.6m.dll Includes: -I/usr/include/python3.6m Extra Flags: none (perl Makefile.PL --help for details) Checking if your kit is complete... Looks good Generating a Unix-style Makefile Writing Makefile for Inline::Python Writing MYMETA.yml and MYMETA.json
- Test 35 will fail due to 'rss' not being available in Windows (See PORTING file under Proc::ProccessTable source).
-
. . . t/31stringification.t ..... ok t/32boolean.t ............. ok t/33reinit.t .............. ok t/34env.t ................. ok t/35dictunicodememleak.t .. Can't access `rss' field in class Proc::Pr +ocessTable::Process at t/35dictunicodememleak.t line 28. # Looks like your test exited with 2 before it could output anything. t/35dictunicodememleak.t .. Dubious, test returned 2 (wstat 512, 0x200 +) Failed 2/2 subtests t/cmp.t ................... ok Test Summary Report ------------------- t/35dictunicodememleak.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 2 tests but ran 0. Files=37, Tests=838, 12 wallclock secs ( 0.12 usr 0.19 sys + 3.16 cu +sr 7.80 csys = 11.27 CPU) Result: FAIL Failed 1/37 test programs. 0/838 subtests failed. make: *** [Makefile:1061: test_dynamic] Error 255
- Rename "t/35dictunicodememleak.t"
- Tests pass:
. . . t/34env.t .............. ok t/cmp.t ................ ok All tests successful. Files=36, Tests=838, 12 wallclock secs ( 0.09 usr 0.22 sys + 2.94 cu +sr 7.37 csys = 10.62 CPU) Result: PASS
Testing...
$ perl -e ' print "9 + 16 = ", add(9, 16), "\n"; print "9 - 16 = ", subtract(9, 16), "\n"; use Inline Python => <<"END_OF_PYTHON_CODE"; def add(x,y): return x + y def subtract(x,y): return x - y END_OF_PYTHON_CODE ' __output__ 9 + 16 = 25 9 - 16 = -7
Hope this helps, because this was a pain to type as appropriately formatted correctly as possible... Whew!
Aaaaand if you choose to say, "Screw Cygwin!", then that is OK, too. :)
Lastly, these steps worked for me, but YMMV...
--Derrick
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Inline::Python for windows 10
by tobbes (Acolyte) on Oct 17, 2018 at 11:26 UTC |
In Section
Seekers of Perl Wisdom