in reply to Re: Installing cpanminus in Strawberry Perl on Windows 10
in thread Installing cpanminus in Strawberry Perl on Windows 10

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>

Replies are listed 'Best First'.
Re^3: Installing cpanminus in Strawberry Perl on Windows 10
by pryrt (Abbot) on Aug 11, 2017 at 13:12 UTC

    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.

        Your setup isn't even untaring the files it downloads:

        Using Tar:/usr/bin/tar xf "App-cpanminus-1.7043.tar": The system cannot find the path specified

        You're running windows, this isn't a path that exists, tell cpan where tar is, or look at how Strawberry has cpan configured. This 'custom' build of Strawberry called slic3r perl, is only going to muddy the waters IMHO.

        As a side note, you may want to consider using a Linux system for 3D printing, or at least something like octopi. Besides being much easier to setup on linux, a friend was printing some parts for me only for Windows 10 to do an unexpected reboot to install security patches, 2 hours 30 mins into a 2 hour 45 minute print.

        Looking at the paths from your o conf, such as /c/Users/David/.cpan, it looks more like a cygwin configuration for cpan (from what I remember from my few abortive experiences with cygwin). Given the look of that cpan config, I think the reason it worked for me when I installed the Slic3r perl x64 and installed App::cpanminus using cpan was that I have installed a bunch of the GnuWin32 utilities in places like /usr/bin, and they are in my path, so the strangely-configured cpan was still able to do what I meant.

        I agree with ++marto, their custom 64bit Strawberry is muddying things. I'm glad you were able to get it running with the standard 32-bit Strawberry.

        For reference, with a standard instance of (portable) 64bit Strawberry (using berrybrew to install it), the out-of-the box cpan configuration for 5.24.2 x64 looks like the following for me: