programmingzeal has asked for the wisdom of the Perl Monks concerning the following question:

I have Perl installed on windows 10 (strawberry).
This is perl 5, version 32, subversion 1 (v5.32.1) built for MSWin32-x64-multi-thread.
I am trying to run Python and Perl both on same windows via same Jupyter Notebook. I googled and questioned chatgpt about how to install Perl for Jupyter Notebook. I found following answer:
To run Perl code in Jupyter Notebook, you need to install a Perl kerne +l. One such kernel is the Perl 6 Kernel which supports Perl 6 program +ming language, but it can also execute some Perl 5 code. You can inst +all it using the following command: Copy code pip install jupyter_kernel_perl6

I ran command and tried to install Devel::IPerl via CPAN but it is failing with following errors:
Configuring P/PE/PEVANS/Future-IO-0.13.tar.gz with Build.PL Created MYMETA.yml and MYMETA.json Creating new 'Build' script for 'Future-IO' version '0.13' PEVANS/Future-IO-0.13.tar.gz C:\Strawberry\perl\bin\perl.exe Build.PL -- OK Running Build for P/PE/PEVANS/Future-IO-0.13.tar.gz Building Future-IO PEVANS/Future-IO-0.13.tar.gz C:\Strawberry\perl\bin\perl.exe ./Build -- OK Running Build test for PEVANS/Future-IO-0.13.tar.gz t\00use.t ................ ok t\01sleep.t .............. ok t\02sysread.t ............ ok t\03sysread_exactly.t .... ok t\03sysread_until_eof.t .. ok t\04syswrite.t ........... ok t\05syswrite_exactly.t ... ok t\06connect.t ............ 1/? # Failed test 'Future::IO->connect fails on closed server' # at C:\STRAWB~1\cpan\build\Future-IO-0.13-2\blib\lib/Test/Future/IO/I +mpl.pm line 194. t\06connect.t ............ 2/? # Failed test 'Future::IO->connect failure' # at C:\STRAWB~1\cpan\build\Future-IO-0.13-2\blib\lib/Test/Future/IO/I +mpl.pm line 196. # +------+-----------------------------+----+------------------------- +----+ # | PATH | GOT | OP | CHECK + | # +------+-----------------------------+----+------------------------- +----+ # | [0] | <DOES NOT EXIST> | | connect: No connection c +oul | # | | | | d be made because the ta +rge | # | | | | t machine actively refus +ed | # | | | | it.\n + | # | | | | + | # | [1] | <DOES NOT EXIST> | | connect + | # | | | | + | # | [2] | <DOES NOT EXIST> | == | IO::Socket::INET=GLOB(0x +353 | # | | | | e5a8) + | # | | | | + | # | [3] | <DOES NOT EXIST> | | No connection could be m +ade | # | | | | because the target mach +ine | # | | | | actively refused it. + | # +------+-----------------------------+----+------------------------- +----+ # Seeded srand with seed '20230331' from local date. t\06connect.t ............ Dubious, test returned 2 (wstat 512, 0x200) Failed 2/3 subtests t\07accept.t ............. ok t\10sleep+sysread.t ...... skipped: Cannot select() on pipes on Window +s t\20impl-override.t ...... ok t\21impl-before-load.t ... ok t\30system.t ............. skipped: Unable to find a Future::IO impl t +hat supports ->waitpid t\99pod.t ................ ok Test Summary Report ------------------- t\06connect.t (Wstat: 512 Tests: 3 Failed: 2) Failed tests: 2-3 Non-zero exit status: 2 Files=14, Tests=38, 12 wallclock secs ( 0.13 usr + 0.02 sys = 0.14 C +PU) Result: FAIL Failed 1/14 test programs. 2/38 subtests failed. Lockfile removed. PEVANS/Future-IO-0.13.tar.gz C:\Strawberry\perl\bin\perl.exe ./Build test -- NOT OK

Please tell me how to complete Perl installation?

Replies are listed 'Best First'.
Re: Running Perl Strawberry on Windows via Jupyter Notebook
by kcott (Archbishop) on Mar 31, 2023 at 15:01 UTC

    G'day programmingzeal,

    [Disclaimer: I'm not a user of Jupyter. The following is just some information which may be of use to you.]

    If you SuperSearch for "ChatGPT" here, you'll find that it's mostly been lacking, in one way or another, with respect to Perl queries. In this instance, it's found Perl6, and presumably assumed that's an upgrade from Perl5: that's not the case — Perl6 is considered a sister language to Perl5; I don't imagine Perl6 is what you want. Perl6 was renamed to Raku some years ago; the Raku FAQ has more about that.

    Perl v5.32.1 is the latest, stable release from Strawberry Perl; it's what you currently have. There are later, experimental versions: probably not what you want; there's further discussion in "When might we see new releases of Strawberry Perl on Windows".

    There was a similar (Jupyter) question some weeks ago: "jupyter kernel perl". This didn't lead to a solution; the last post in that thread has "no luck so far"; it's also for a different OS. However, there may be some useful information there; perhaps leading to further avenues for investigation.

    — Ken

Re: Running Perl Strawberry on Windows via Jupyter Notebook
by soonix (Chancellor) on Mar 31, 2023 at 13:02 UTC
    I don't have experience with Jupyter, but the error message (lines 19..40) seems to indicate a networking / firewall / proxy issue. Does Jupyter use the same proxy settings as your browser?
    regarding crossposting, I like to point to Re^2: Cross-posting Policy? ;-)
      I am on my personal laptop with no proxy settings. I am using wi-fi and cellular internet without proxy settings. But let me check jupyter network settings.
        Jupyter notebook runs in my chrome browser and there are no proxy settings. I have enabled windows 10 original firewall. First I thought that the above error is due to the fact that jupyter is not running and installing Devel::IPerl might be requiring jupyter notebook instance running but this even has not resolved the issue. I decided to run cpan commands in jupyter notebook terminal tab in my chrome browser. Now I am using browser jupyter terminal tab for cpan commands. I again looked at the dependencies errors and found that for installing Devel::IPerl following dependencies are unmet.
        Warning: prerequisite IO::Async::Handle 0 not found. Warning: prerequisite IO::Async::Loop 0 not found. Warning: prerequisite IO::Async::Routine 0 not found. Warning: prerequisite Net::Async::ZMQ 0.002 not found. Warning: prerequisite Net::Async::ZMQ::Socket 0 not found. Warning: prerequisite ZMQ::FFI 1.18 not found.

        I tried resolving/installing one by one from top to bottom but every dependency required additional dependency or failed tests all with HTTP / connection /webserver sort of test fail errors. In last I tried installing ZMQ::FFI but it failed with following dependencies:
        Unsatisfied dependencies detected during ---- ---- MLEHMANN/AnyEvent-7.17.tar.gz ---- Async::Interrupt [requires,optional] EV [requires,optional] Guard [requires,optional]

        I then individually resolved all the above three dependencies installations and upon running "install AnyEvent" it generated following error where notable error is about test unable to make connection with host machine / network configuration error / environment variable setting etc.
        nolock_cpan> install M/ML/MLEHMANN/AnyEvent-7.17.tar.gz MLEHMANN/AnyEvent-7.17.tar.gz Has already been unwrapped into directory C:\STRAWB~1\cpan\build\Any +Event-7.17-0 MLEHMANN/AnyEvent-7.17.tar.gz Has already been prepared MLEHMANN/AnyEvent-7.17.tar.gz Has already been made Running make test for MLEHMANN/AnyEvent-7.17.tar.gz "C:\Strawberry\perl\bin\perl.exe" "-Iblib\arch" "-Iblib\lib" constants +.pl.PL constants.pl "C:\Strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::H +arness" "-e" "undef *Test::Harness::Switches; test_ha rness(0, 'blib\lib', 'blib\arch')" t/*.t t/handle/*.t t/00_load.t ................ ok t/01_basic.t ............... ok t/02_signals.t ............. skipped: Broken perl detected, skipping t +ests. t/03_child.t ............... skipped: Your perl interpreter is badly B +ROKEN. Child watchers will not work, ever. Try upgrad ing to a newer perl or a working perl (cygwin's perl is known to work) +. If that is not an option, you should be able to use the remaining functionality of AnyEvent, but child watchers WILL NOT +WORK. t/04_condvar.t ............. ok t/05_dns.t ................. ok t/06_socket.t .............. ok t/07_io.t .................. ok t/08_idna.t ................ ok t/09_multi.t ............... skipped: Your perl interpreter is badly B +ROKEN. Child watchers will not work, ever. Try upgrad ing to a newer perl or a working perl (cygwin's perl is known to work) +. If that is not an option, you should be able to use the remaining functionality of AnyEvent, but child watchers WILL NOT +WORK. t/10_loadall.t ............. ok t/11_io_perl.t ............. ok t/12_io_ioaio.t ............ skipped: AnyEvent::IO::IOAIO not loadable t/13_weaken.t .............. ok t/61_fltk_01_basic.t ....... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/61_fltk_02_signals.t ..... skipped: Broken perl detected, skipping t +ests. t/61_fltk_03_child.t ....... skipped: Your perl interpreter is badly B +ROKEN. Child watchers will not work, ever. Try upgrad ing to a newer perl or a working perl (cygwin's perl is known to work) +. If that is not an option, you should be able to use the remaining functionality of AnyEvent, but child watchers WILL NOT +WORK. t/61_fltk_04_condvar.t ..... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/61_fltk_05_dns.t ......... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/61_fltk_07_io.t .......... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/61_fltk_09_multi.t ....... skipped: Your perl interpreter is badly B +ROKEN. Child watchers will not work, ever. Try upgrad ing to a newer perl or a working perl (cygwin's perl is known to work) +. If that is not an option, you should be able to use the remaining functionality of AnyEvent, but child watchers WILL NOT +WORK. t/62_cocoa_01_basic.t ...... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/62_cocoa_02_signals.t .... skipped: Broken perl detected, skipping t +ests. t/62_cocoa_03_child.t ...... skipped: Your perl interpreter is badly B +ROKEN. Child watchers will not work, ever. Try upgrad ing to a newer perl or a working perl (cygwin's perl is known to work) +. If that is not an option, you should be able to use the remaining functionality of AnyEvent, but child watchers WILL NOT +WORK. t/62_cocoa_04_condvar.t .... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/62_cocoa_05_dns.t ........ skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/62_cocoa_07_io.t ......... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/62_cocoa_09_multi.t ...... skipped: Your perl interpreter is badly B +ROKEN. Child watchers will not work, ever. Try upgrad ing to a newer perl or a working perl (cygwin's perl is known to work) +. If that is not an option, you should be able to use the remaining functionality of AnyEvent, but child watchers WILL NOT +WORK. t/64_glib_01_basic.t ....... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/64_glib_02_signals.t ..... skipped: Broken perl detected, skipping t +ests. t/64_glib_03_child.t ....... skipped: Your perl interpreter is badly B +ROKEN. Child watchers will not work, ever. Try upgrad ing to a newer perl or a working perl (cygwin's perl is known to work) +. If that is not an option, you should be able to use the remaining functionality of AnyEvent, but child watchers WILL NOT +WORK. t/64_glib_04_condvar.t ..... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/64_glib_05_dns.t ......... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/64_glib_07_io.t .......... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/64_glib_09_multi.t ....... skipped: Your perl interpreter is badly B +ROKEN. Child watchers will not work, ever. Try upgrad ing to a newer perl or a working perl (cygwin's perl is known to work) +. If that is not an option, you should be able to use the remaining functionality of AnyEvent, but child watchers WILL NOT +WORK. t/65_event_01_basic.t ...... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/65_event_02_signals.t .... skipped: Broken perl detected, skipping t +ests. t/65_event_03_child.t ...... skipped: Your perl interpreter is badly B +ROKEN. Child watchers will not work, ever. Try upgrad ing to a newer perl or a working perl (cygwin's perl is known to work) +. If that is not an option, you should be able to use the remaining functionality of AnyEvent, but child watchers WILL NOT +WORK. t/65_event_04_condvar.t .... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/65_event_05_dns.t ........ skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/65_event_07_io.t ......... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/65_event_09_multi.t ...... skipped: Your perl interpreter is badly B +ROKEN. Child watchers will not work, ever. Try upgrad ing to a newer perl or a working perl (cygwin's perl is known to work) +. If that is not an option, you should be able to use the remaining functionality of AnyEvent, but child watchers WILL NOT +WORK. t/66_ioasync_01_basic.t .... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/66_ioasync_02_signals.t .. skipped: Broken perl detected, skipping t +ests. t/66_ioasync_03_child.t .... skipped: Your perl interpreter is badly B +ROKEN. Child watchers will not work, ever. Try upgrad ing to a newer perl or a working perl (cygwin's perl is known to work) +. If that is not an option, you should be able to use the remaining functionality of AnyEvent, but child watchers WILL NOT +WORK. t/66_ioasync_04_condvar.t .. skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/66_ioasync_05_dns.t ...... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/66_ioasync_07_io.t ....... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/66_ioasync_09_multi.t .... skipped: Your perl interpreter is badly B +ROKEN. Child watchers will not work, ever. Try upgrad ing to a newer perl or a working perl (cygwin's perl is known to work) +. If that is not an option, you should be able to use the remaining functionality of AnyEvent, but child watchers WILL NOT +WORK. t/67_tk_01_basic.t ......... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/67_tk_02_signals.t ....... skipped: Broken perl detected, skipping t +ests. t/67_tk_03_child.t ......... skipped: Your perl interpreter is badly B +ROKEN. Child watchers will not work, ever. Try upgrad ing to a newer perl or a working perl (cygwin's perl is known to work) +. If that is not an option, you should be able to use the remaining functionality of AnyEvent, but child watchers WILL NOT +WORK. t/67_tk_04_condvar.t ....... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/67_tk_05_dns.t ........... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/67_tk_07_io.t ............ skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/67_tk_09_multi.t ......... skipped: Your perl interpreter is badly B +ROKEN. Child watchers will not work, ever. Try upgrad ing to a newer perl or a working perl (cygwin's perl is known to work) +. If that is not an option, you should be able to use the remaining functionality of AnyEvent, but child watchers WILL NOT +WORK. t/68_poe_01_basic.t ........ skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/68_poe_02_signals.t ...... skipped: Broken perl detected, skipping t +ests. t/68_poe_03_child.t ........ skipped: Your perl interpreter is badly B +ROKEN. Child watchers will not work, ever. Try upgrad ing to a newer perl or a working perl (cygwin's perl is known to work) +. If that is not an option, you should be able to use the remaining functionality of AnyEvent, but child watchers WILL NOT +WORK. t/68_poe_04_condvar.t ...... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/68_poe_05_dns.t .......... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/68_poe_07_io.t ........... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/68_poe_09_multi.t ........ skipped: Your perl interpreter is badly B +ROKEN. Child watchers will not work, ever. Try upgrad ing to a newer perl or a working perl (cygwin's perl is known to work) +. If that is not an option, you should be able to use the remaining functionality of AnyEvent, but child watchers WILL NOT +WORK. t/69_ev_01_basic.t ......... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/69_ev_02_signals.t ....... skipped: Broken perl detected, skipping t +ests. t/69_ev_03_child.t ......... skipped: Your perl interpreter is badly B +ROKEN. Child watchers will not work, ever. Try upgrad ing to a newer perl or a working perl (cygwin's perl is known to work) +. If that is not an option, you should be able to use the remaining functionality of AnyEvent, but child watchers WILL NOT +WORK. t/69_ev_04_condvar.t ....... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/69_ev_05_dns.t ........... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/69_ev_07_io.t ............ skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/69_ev_09_multi.t ......... skipped: Your perl interpreter is badly B +ROKEN. Child watchers will not work, ever. Try upgrad ing to a newer perl or a working perl (cygwin's perl is known to work) +. If that is not an option, you should be able to use the remaining functionality of AnyEvent, but child watchers WILL NOT +WORK. t/70_uv_01_basic.t ......... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/70_uv_02_signals.t ....... skipped: Broken perl detected, skipping t +ests. t/70_uv_03_child.t ......... skipped: Your perl interpreter is badly B +ROKEN. Child watchers will not work, ever. Try upgrad ing to a newer perl or a working perl (cygwin's perl is known to work) +. If that is not an option, you should be able to use the remaining functionality of AnyEvent, but child watchers WILL NOT +WORK. t/70_uv_04_condvar.t ....... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/70_uv_05_dns.t ........... skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/70_uv_07_io.t ............ skipped: PERL_ANYEVENT_LOOP_TESTS not tru +e t/70_uv_09_multi.t ......... skipped: Your perl interpreter is badly B +ROKEN. Child watchers will not work, ever. Try upgrad ing to a newer perl or a working perl (cygwin's perl is known to work) +. If that is not an option, you should be able to use the remaining functionality of AnyEvent, but child watchers WILL NOT +WORK. t/80_ssltest.t ............. 1/415 # Failed test 'server_error <An established connection was aborted b +y the software in your host machine.>' # at t/80_ssltest.t line 37. # Looks like you failed 1 test of 415. t/80_ssltest.t ............. Dubious, test returned 1 (wstat 256, 0x10 +0) Failed 1/415 subtests t/81_hosts.t ............... ok t/handle/01_readline.t ..... ok t/handle/02_write.t ........ ok t/handle/03_http_req.t ..... skipped: PERL_ANYEVENT_NET_TESTS environm +ent variable not set t/handle/04_listen.t ....... ok

        http://www.cpantesters.org/distro/A/AnyEvent.html

        So I believe the test failing is during some dependency installation which is unable to make connection with host machine. The error of Future:IO is at following .pm file line 194:

        C:\STRAWB~1\cpan\build\Future-IO-0.13-5\blib\lib/Test/Future/IO/Impl.pm



        The code of .pm file is as follows:
        sub run_connect_test { require IO::Socket::INET; my $serversock = IO::Socket::INET->new( Type => Socket::SOCK_STREAM(), LocalAddr => "localhost", LocalPort => 0, Listen => 1, ) or die "Cannot socket()/listen() - $@"; # Some platforms have assigned 127.0.0.1 here; others have left 0.0 +.0.0 # If it's still 0.0.0.0, then guess that maybe connecting to 127.0. +0.1 will # work my $sockname = ( $serversock->sockhost ne "0.0.0.0" ) ? $serversock->sockname : pack_sockaddr_in( $serversock->sockport, INADDR_LOOPBACK ); # ->connect success { my $clientsock = IO::Socket::INET->new( Type => Socket::SOCK_STREAM(), ) or die "Cannot socket() - $@"; $clientsock->blocking( 0 ); my $f = Future::IO->connect( $clientsock, $sockname ); $f->get; my $acceptedsock = $serversock->accept; ok( $clientsock->peername eq $acceptedsock->sockname, 'Accepted +socket address matches' ); } $serversock->close; undef $serversock; # I really hate this, but apparently Win32 testers will fail if we +don't # do this. sleep 1 if $^O eq "MSWin32"; # ->connect fails { my $clientsock = IO::Socket::INET->new( Type => Socket::SOCK_STREAM(), ) or die "Cannot socket() - $@"; $clientsock->blocking( 0 ); my $f = Future::IO->connect( $clientsock, $sockname ); ok( !eval { $f->get; 1 }, 'Future::IO->connect fails on closed s +erver' ); is( [ $f->failure ], [ "connect: $errstr_ECONNREFUSED\n", connect => $clientsock, +$errstr_ECONNREFUSED ], 'Future::IO->connect failure' ); } }


        Future::IO->connect failure

Re: Running Perl Strawberry on Windows via Jupyter Notebook
by LanX (Saint) on Mar 31, 2023 at 12:48 UTC
      Yes I tried following command but it is stopping at above error:
       cpan> install Devel::IPerl
      I even treid following but no good:
      cpan> upgrade Devel::IPerl All modules are up to date for Devel::IPerl
Re: Running Perl Strawberry on Windows via Jupyter Notebook
by LanX (Saint) on Mar 31, 2023 at 12:28 UTC
      I deleted the post on stack overflow. It means cross posting on different forums is forbidden. I never knew. Thanks.

        Hello programmingzeal,

        No, it’s not forbidden, and there’s no need to delete a cross-post. It’s simply considered polite to let the monks know that a query is cross-posted, so they don’t waste time addressing a question which has already been answered elsewhere. LanX was just giving other monks a heads-up.

        Cheers,

        Athanasius <°(((><contra mundum סתם עוד האקר של פרל,

        It means cross posting on different forums is forbidden

        Not forbidden, just customary to let us know.

        It's impolite. At least not to tell.

        When asking for help you don't waste the energy of the helpful.

        I personally only switch forums for the same questions after some days of unfruitful waiting and not without linking back for reference to the results already achieved.

        Cheers Rolf
        (addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
        Wikisyntax for the Monastery