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

Tell us what’s happening:

Describe your issue in detail here.
When the instructions says to select use run commands and press done, what does that mean i should put in the box in the replit window. I have tried all sorts of different run values but nothing will work. no matter what i do i always get exit status 1. I have not even changed any code yet i am just trying to get it to run properly.

Your code so far

When I run the downloaded code

import mean_var_std
from unittest import main

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

import numpy as np

def calculate(list):

return calculations

I get this error:

Note: This error originates from the build backend, and is likely not a problem with poetry but with numpy (1.18.5) not supporting PEP 517 builds. You can verify this by running ‘pip wheel --use-pep517 “numpy (==1.18.5)”’.

exit status 1

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

Challenge Information:

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

In the files nemu, click the three dots and select “show hidden files”.

Edit .replit. Look for this run= and change it to `run = “python3 main.py”

I did that but got this error. I tried manually installing numpy in the shell but that didn’t work.

File “/home/runner/boilerplate-mean-variance-standard-deviation-calculator-1/main.py”, line 3, in
import mean_var_std
File “/home/runner/boilerplate-mean-variance-standard-deviation-calculator-1/mean_var_std.py”, line 1, in
import numpy as np
ModuleNotFoundError: No module named ‘numpy’

in the shell type pip install numpy

What did you try? Did you get an error when you tried to install numpy?

I ran the code and it gave me that error when i tried installing numpy myself it did nothing

Can you copy/paste what happens when you type pip install numpy in the shell prompt?

It should either install successfully or give you an error. If it does nothing then something is very wrong.

This is the error i got
~/boilerplate-mean-variance-standard-deviation-calculator-1$ pip install numpy
error: externally-managed-environment

× This environment is externally managed
╰─> This command has been disabled as it tries to modify the immutable
/nix/store filesystem.

To use Python with Nix and nixpkgs, have a look at the online documentation:
<https://nixos.org/manual/nixpkgs/stable/#python>.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

Ok that’s new!

You might have to select “show hidden files” in the file menu and edit replit.nix to add numpy to the pkgs section. I’ll look for good instructions.

Can you please link to your replit?

Replit also has an ‘auto-install’ feature, so if it’s missing, it might be installed in the background and there the next time you load this

This is my replit link:
boilerplate-mean-variance-standard-deviation-calculator (1) - Replit

1 Like

Delete poetry.lock and pyproject.toml :+1:

Then run your program and it should install numpy.

You should get a nice error like this NameError: name 'calculations' is not defined. and you can start coding.

Thankyou for your help it worked

1 Like