in reply to Installing cpanminus in Strawberry Perl on Windows 10

I've never seen a Strawberry Perl installation as new as 5.24 that doesn't include cpanm. Are you sure your perl environment is set up correctly? If you installed into c:\strawberry, with the perl executable in c:\strawberry\perl\bin\perl.exe, then you should already have cpanm as c:\strawberry\perl\bin\cpanm.bat. Please run

perl -V perl -MApp::cpanminus -le "print 'ok'" perl -le "print for grep { /(berry|perl)/ } split /;/, $ENV{PATH}" cpanm --version
... and share the output. The -V gives more verbose info about your Perl installation (that's a capital V this time, compared to the lowercase -v you showed). The -M line will give an error if App::cpanminus isn't installed or findable. The -le will show us relevant portions of your path. The cpanm execution will give some cpanm-specific info if it's found in your path.

Also, you showed

c:...>perl -v This is perl 5, version 24, subversion 1 (v5.24.1) built for MSWin32-x +64-multi-thread
which indicates a 64-bit build (the -x64-). But the Slic3r instructions say in big bold print, "Strawberry Perl (32-bit only)". Oh, sorry, re-reading, I see they have a patched version of 64-bit Perl that they claim works, that they called "Slic3r Perl". Did you grab that, or a 64-bit directly from Strawberry Perl?

Replies are listed 'Best First'.
Re^2: Installing cpanminus in Strawberry Perl on Windows 10
by les751 (Initiate) on Aug 11, 2017 at 00:35 UTC

    Thank you for your prompt response. I am using the Slic3r Perl version.

    C:\strawberry\perl\bin\perl.exe exists, but C:\strawberry\perl\bin\cpanm.bat does not exist.

    Here is the output of the commands you requested:

    C:\Users\David\Documents\3D_Printer\Slic3r>perl -V Summary of my perl5 (revision 5 version 24 subversion 1) configuration +: Platform: osname=MSWin32, osvers=10.0, archname=MSWin32-x64-multi-thread uname='Win32 strawberry-perl 5.24.1.4 #1 Sun Mar 26 22:24:56 2017 +x64' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef useithreads=define, usemultiplicity=define use64bitint=define, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef <readmore> Compiler: cc='gcc', ccflags =' -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL +_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fwrapv + -fno-strict-aliasing -mms-bitfields', optimize='-s -O2', cppflags='-DWIN32' ccversion='', gccversion='6.3.0', gccosandvers='' intsize=4, longsize=4, ptrsize=8, doublesize=8, byteorder=12345678 +, doublekind=3 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +6, longdblkind=3 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='lo +ng long', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='g++', ldflags ='-s -L"C:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~ +1\c\lib"' libpth=C:\STRAWB~1\c\lib C:\STRAWB~1\c\x86_64-w64-mingw32\lib C:\S +TRAWB~1\c\lib\gcc\x86_64-w64-mingw32\6.3.0 libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 +-ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -l +mpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdl +g32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_3 +2 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 libc=, so=dll, useshrplib=true, libperl=libperl524.a gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=xs.dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-mdll -s -L"C:\STRAWB~1\perl\lib\CORE" +-L"C:\STRAWB~1\c\lib"' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY PERLIO_LAYERS PERL_COPY_ON_WRITE PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_64_BIT +_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO USE_PERL_ATOF Built under MSWin32 Compiled at Mar 26 2017 22:29:51 @INC: C:/Strawberry/perl/site/lib C:/Strawberry/perl/vendor/lib C:/Strawberry/perl/lib . C:\Users\David\Documents\3D_Printer\Slic3r>perl -MApp::cpanminus -le " +print 'ok'" Can't locate App/cpanminus.pm in @INC (you may need to install the App +::cpanminus module) (@INC contains: C:/Strawberry/perl/site/lib C:/St +rawberry/perl/vendor/lib C:/Strawberry/perl/lib .). BEGIN failed--compilation aborted. C:\Users\David\Documents\3D_Printer\Slic3r>perl -le "print for grep { +/(berry|perl)/ } split /;/, $ENV{PATH}" C:\Strawberry\c\bin C:\Strawberry\perl\site\bin C:\Strawberry\perl\bin C:\Users\David\Documents\3D_Printer\Slic3r>cpanm --version 'cpanm' is not recognized as an internal or external command, operable program or batch file. C:\Users\David\Documents\3D_Printer\Slic3r></readmore>

      Weird. I just did a fresh install of Slic3r's 5.24.1 (64bit). It didn't have cpanm. However, I ran cpan, and within the cpan shell, ran install App::cpanminus, which was successful

      After doing that, I can successfully find and run cpanm:

      I wonder if something got corrupted in your version of Slic3r's 64-bit Strawberry Perl. You might want to try to uninstall and reinstall, then try to install the cpanm from inside the cpan client (it shouldn't make a difference... but since the steps worked for me, maybe they will for you as well).

      If that doesn't work: do you need 64bit? If not, you might follow Slic3r's instructions for the standard 32-bit Strawberry, which does come with cpanm already installed. Given that Slic3r frequently mentions 5.24, and because Strawberry 5.26 changed away from dmake to gmake (which has caused some module installation problems for some people), I'd pick the "Strawberry Perl 5.24.2.1 (32bit)" installer link from Strawberry's main page.)

      update: I should point out that for this test, I was on Windows 7, not Windows 10. It might cause different behavior.

      update 2: If you still have difficulty, you might be able to ask on the Slic3r issues page for them to bundle cpanm with their custom 5.24.1 64bit -- actually, you might want to ask them to do that anyway, given the difficulties you've already had.

        Thank you for all your help; this issue has been resolved! I'm glad that you pointed out that I might not need the 64-bit version. I downloaded the Strawberry 5.24 32-bit version, and successfully installed. Good news, cpanminus was included.

        Thanks also for testing Slic3r perl yourself. As per your suggestion, I uninstalled, redownloaded, and reinstalled Slicer perl, but I was unable to install cpanminus even from inside cpan.