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
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.
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.