Ask coding questions

← Back to all posts
Error with all repls
Ashenguard (9)

I had 3 discord bots running on repl, Suddenly all of them stopped working, When I try to restart them this error happens Updating package configuration

--> python3 -m poetry install
Skipping virtualenv creation, as specified in config file.
Installing dependencies from lock file

Package operations: 7 installs, 1 update, 0 removals

  - Installing websockets (8.1)
  - Installing decorator (4.4.2)
  - Installing (1.3.3)
  - Updating six (1.11.0 /usr/lib/python3/dist-packages -> 1.15.0)

Command ['/usr/local/bin/python3', '-m', 'pip', 'uninstall', 'six', '-y']
 errored with the following return code 2, and output: 
Found existing installation: six 1.11.0
Uninstalling six-1.11.0:
ERROR: Exception:
Traceback (most recent call last):
  File "/usr/lib/python3.8/", line 788, in move
    os.rename(src, real_dst)
PermissionError: [Errno 13] Permission denied: '/usr/lib/python3/dist-pac
kages/__pycache__/six.cpython-38.pyc' -> '/tmp/pip-uninstall-3odhgaca/six

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/base_com", line 188, in _main
    status =, args)
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/commands/", line 85, in run
    uninstall_pathset = req.uninstall(
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/req/", line 676, in uninstall
    uninstalled_pathset.remove(auto_confirm, verbose)
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/req/", line 394, in remove
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/req/", line 283, in stash
    renames(path, new_path)
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/utils/", line 349, in renames
    shutil.move(old, new)
  File "/usr/lib/python3.8/", line 803, in move
PermissionError: [Errno 13] Permission denied: '/usr/lib/python3/dist-packages/__pycache__/six.cpython-38.pyc'

exit status 1 Package operation failed.

Do you know what's going on?

Ashenguard (9)

It seems problem is gone by itself, But it just forced me to go a new host sadly

TrainsRUs (5)

What repl does when you click the run button:

  • It tries to install the modules on the repl device root, not local to your project. Unfortunately, this is what leads to the errors.
  • You can install modules locally, which is what is used to do, using Ctrl+Shift+S to get to terminal and pip install --user [module] (--user specifies for locally), however, repl still looks to the main computer when you hit the run button
TheForArkLD (763)

do this in console

import os
os.system("pip install discord")
Ashenguard (9)

@TheForArkLD I tried this, But this error is irrelevant to this soulotion error says that there is a missing permission

Ashenguard (9)

@TheForArkLD lol, I don't code in Javascript
I'm a python coder

TheForArkLD (763)

@Ashenguard Learn lol ( ͡° ͜ʖ ͡°)

Ashenguard (9)

@TheForArkLD Do you mind to let some one that knows python help me

CodingCactus (4191)

@Ashenguard pip install should fix your problem?

Saibot84 (45)

I'm having the same problem with my python repls. I can't run my repls using the run button because poetry is having the same PermissionError you've shown.

Based on TheForArkLD's answer, I got my repl to run correctly by using the console to install the packages I needed, and then using the console to run my python code.

import subprocess'bash')
pip3 install packages_names_here

I'd also like to mention that I tried using a .replit file to modify the behavior of the run button, but it didn't work for me.

Using pip3 install -r requirements.txt seems to work, too, but I still have to call python3 instead of using the run button.

ike_fite (12)

@Ashenguard Do you know OOP? Discord.js is the same thing. I don't know js either, but I made a js bot.

Saibot84 (45)

Update: My python repls seem to be working now. It looks like the issue was a problem with the poetry configuration, but it must have been fixed because poetry is no longer showing a PermissionError and my python repls are running fine right now.

maxaitel (4)

@Saibot84 did they just get fixed randomly? because I am having the same problem and am wondering if it is my fault.

Saibot84 (45)

@maxaitel Yes, they fixed it, but I'm not sure when. As far as I know, Repl no longer uses the requirements.txt file.

I've been using poetry to manage dependencies (instead of pip) and that has helped avoid some issues.

One thing I try sometimes when poetry starts having issues, is to delete the poetry.lock file, which should force poetry, on the next run, to rebuild it.

If deleting poetry.lock doesn't resolve it. Sometimes I've had to also delete pyproject.toml.

If you want to let Repl handle the creation of pyproject.toml, just click the run button after deleting both pyproject.toml and poetry.lock. Repl will create the toml file, guess the packages you need, and then lock/install those packages.

If you want to recreate pyproject.toml yourself, use the shell command poetry init --no-interaction to create a new pyproject.toml file. Then use poetry add package-name to add the dependencies you need.

If you have a link you can share, I can fork it for you and see if we can get it to run.

gumickycz4 (0)

@Saibot84 Hey! Ive been having this problem too and i cant figure the hell out what is the problem. You said you fixed it with some tweaking in poetry. What did you do? I want to try it too because it is pissing me off soooo much :D. Thanks so much!

Saibot84 (45)

Great question, @gumickycz4 !

I don't remember which repl I was working on for this but looking at the original post ...

poetry hit an error, and it decided to uninstall six because it was no longer required. Unfortunately, without six, poetry doesn't seem to work. We can use pip3 install six and then poetry add six so that six will no longer be "accidentally" uninstalled.

Running poetry add six will add the six package to the list of dependencies in pyproject.toml

six can also be added to poetry's pyproject.toml manually by adding six = "version_num" as a line by itself under [tool.poetry.dependencies] like below:

python = "^3.8"
pep8 = "^1.7.1"
six = "^1.11.0"

That should solve the missing six package ... and then we can continue trying to debug why poetry failed in the first place.

If you have a link you can share, I can fork it for you and see if we can get it to run.