Error installing dependencies

I had an application running normally and for some reason all my dependencies disappeared. I’m installing one by one but I had an error in the request library. After installing I try to run it but the error appears that the lib version is request@0.2.1.0. From what I understand, the error is in Ngix because when I give a pip install request it installs successfully.

How do I fix this error? Should I disable Ngix?


The error was occurring because in my model folder I did not have the “init.py” file. After adding aroma

2 Likes

Error returned, I thought I had fixed it but it was still happening

First, it’s nix, not “ngix”.
Second, you are trying to install a Haskell package for python. Is this intended?

Remove that dependency, and from now on, use the Packages tab for packages, or directly use poetry commands in the shell. Generally, system dependencies should not be touched.

4 Likes

Hi @LucasAdriSilva !
Firstly, go to your replit.nix file by clicking on the 3 dots in the Files sidebar then click Show Hiddden Files.
Make sure that there is nothing in deps:

{ pkgs }: {
  deps = [

  ];
}

Then, enter poetry add requests in the Shell to install the requests module.
Hope this helps!

After commenting on some parts of my replit.nix file, the system ran and deployed but the message still appears. This library is the one that interacts with other apis, should I be concerned because I can’t run tests on the prod as they are endpoints related to my client’s user platform

I don’t understand correctly, I’m installing the depedencals directly in my shell using PIP but as I got an error, I’m trying to install them using System Dependencies but the request is not updated in this interface

Hi @LucasAdriSilva !
You should be using poetry add packgaename to install packages.
Are you trying to use Python modules here?

@NateDhaliwal How do I use poetry? through the terminal or does it have some interface?

You use it through the Shell.
What packages are you trying to add?

request and psycopg2

@LucasAdriSilva Do you mean requests and not request?

sorry it was a typo, this is requests

Ah, then enter poetry add requests psycopg2 in the Shell, and edit your replit.nix file (if you don’t need Nix packages) to this:

{ pkgs }: {
  deps = [

  ];
}

This should work now.

2 questions:

1st There was an error during installation, where did you tell me to try using pip, do I know the suggestio command?

2nd After installing it in my replit.nix, do I add it manually? Do I follow the standards that were set before?

Actually, packages and info will go into pyproject.toml, not replit.nix. replit.nix is for Nix packages, but you want Python packages.

Hi @LucasAdriSilva!
Can you try this:

Then run the poetry install command again.

Is it normal to take this long, I’m more than 20m away?

After 1h it was, but when I went to deploy it gave this error:

I think it’s still connected to nix

Could you send the link to your repl?