0

I am currently using Cloud9 in AWS to develop and deploy Lambdas. I prefer to create a virtual environment to contain the specific packages that I will need for my Lambda, and I have been able to activate my venv and install the relevant packages in the environment.

My problem comes when I go to run my script and the runner/interpreter seems to use packages from the pre-built python instance when I create the cloud9 environment.

My only guess to the solution is to some how create a new runner that uses the virtual environment I created. But I am not sure how to do this.

Any assistance would be much appreciated.

Tom
  • 925
  • 3
  • 10
  • 24
  • Can you check the output of "sys.path" in your code? If your env path is not there, then try changing your .bashrc file. Check https://forums.aws.amazon.com/thread.jspa?threadID=288987. – ydrall Feb 11 '20 at 07:36
  • 1
    Are you hitting the Run button at the top of Cloud9? Because that won't use your virtual environment - you'll have to run it from a terminal session after activating the virtual environment. – Jamie Feb 11 '20 at 10:09
  • Yes, I am running from within the terminal once the environment is activated. Interestingly, I found that I am not have this problem in an ubuntu version of cloud9, just the linux version. – Tom Feb 12 '20 at 00:55

0 Answers0