Data Analysis with Python Projects - Mean-Variance-Standard Deviation Calculator

Tell us what’s happening:

Hello, I’m trying to run my code in replit and both the console and shell are giving errors like: “import command not found”

I thought python import was a standard command. Do I need to install any dependencies before running code on replit? I also had to do a “chmod +x” before I could even run it.

My code so far

# This entrypoint file to be used in development. Start by reading README.md
import mean_var_std
from unittest import main

print(mean_var_std.calculate([0,1,2,3,4,5,6,7,8]))

# Run unit tests automatically
main(module='test_module', exit=False)# This entrypoint file to be used in development. Start by reading README.md
import mean_var_std
from unittest import main

print(mean_var_std.calculate([0,1,2,3,4,5,6,7,8]))

# Run unit tests automatically
main(module='test_module', exit=False)

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.102 Safari/537.36

Challenge: Data Analysis with Python Projects - Mean-Variance-Standard Deviation Calculator

Link to the challenge:

Here’s the link from where I was developing: boilerplate-mean-variance-standard-deviation-calculator - Replit

You had to do a chmod in replit??

After you imported the boilerplate project to Replit, did you select "Use run command" and click the "Done" button before attempting to run the program? That might be the problem, but I’m not totally sure.

I’m pretty sure I did that…should I click the “Run” button at the top or execute it in console/shell?

When clicking Run at the top, I can see the CPU/RAM usage maxing out…I’m thinking that’s what’s making it run slowly

boilerplate-mean-variance-standard-deviation-calculator - Replit

Once you import the boilerplate, there is a screen on the upper right. If you select “use run command” then “done”, you can click the “Run” button at the top whenever you want to execute your code.

The RAM/CPU is maxing out probably because Replit is trying to downgrade some of the dependencies. You can alter the poetry.lock file, change the version number on whatever Replit is trying to downgrade (to the version that Replit is trying to downgrade to). And then it should be a lot quicker.

Used the “use run command” and done and it’s been like this for a few minutes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.