Using modules in a virtual environment

Hi there

I have a virtual environment set up with 2 modules installed + what ever dependancies

state install Statistics::Distributions
state install Statistics::Regression

#!/usr/bin/perl -w
use strict;
use Statistics::Distributions; # Statistical test
use Statistics::Regression; # Calculate regression coefficients
use Getopt::Std;
use vars qw ($opt_i);
getopts (‘i:’);

[merrittr/madpipeline] C:\Users\rwm132\flax\madpipeline>perl MADPipeline_Step1b.pl -i BxN_Preston_Wilt_Data_2019_for_MAD.txt_converted.txt
Can’t locate Statistics/Distributions.pm in @INC (you may need to install the Statistics::Distributions module) (@INC contains: C:/Users/rwm132/AppData/Local/activestate/57dd5cda/site/lib C:/Users/rwm132/AppData/Local/activestate/57dd5cda/lib) at MADPipeline_Step1b.pl line 3.
BEGIN failed–compilation aborted at MADPipeline_Step1b.pl line 3.

so it is failing at
use Statistics::Distributions; # Statistical test

which is in that environment, should the path not be known to the PERL interpreter?

Hey @merrittr!

Thanks for the detailed report!

When I look at your project (https://platform.activestate.com/merrittr/madpipeline), I only see Statistics::Regression on the list of installed modules and I don’t see Statistics::Distributions in the history of the project at https://platform.activestate.com/merrittr/madpipeline/releases.

Perhaps the attempt to install the module failed? Can you run state install Statistics::Distributions again and let us know what the outcome is?

Cheers!
–zak