'Replit not installing dependencies
I tried to use replit as an online host as a temporary solution before finding a free hosting service. However, as i try to install dependencies there, I get an error code something like this:
Traceback (most recent call last): File "/opt/virtualenvs/python3/bin/pip", line 5, in <module> from pip._internal.cli.main import main File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pip/_internal/cli/main.py", line 9, in <module> from pip._internal.cli.autocompletion import autocomplete File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pip/_internal/cli/autocompletion.py", line 10, in <module> from pip._internal.cli.main_parser import create_main_parser File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pip/_internal/cli/main_parser.py", line 8, in <module> from pip._internal.cli import cmdoptions File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pip/_internal/cli/cmdoptions.py", line 23, in <module> from pip._internal.cli.parser import ConfigOptionParser File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pip/_internal/cli/parser.py", line 12, in <module> from pip._internal.configuration import Configuration, ConfigurationError File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pip/_internal/configuration.py", line 27, in <module> from pip._internal.utils.misc import ensure_dir, enum File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pip/_internal/utils/misc.py", line 38, in <module> from pip._vendor.tenacity import retry, stop_after_delay, wait_fixed File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pip/_vendor/tenacity/__init__.py", line 522, in <module> from pip._vendor.tenacity._asyncio import AsyncRetrying File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pip/_vendor/tenacity/_asyncio.py", line 19, in <module> from asyncio import sleep File "/opt/virtualenvs/python3/lib/python3.8/site-packages/asyncio/__init__.py", line 21, in <module> from .base_events import * File "/opt/virtualenvs/python3/lib/python3.8/site-packages/asyncio/base_events.py", line 296 future = tasks.async(future, loop=self) ^ SyntaxError: invalid syntax
Thus far, I have only tried making venvs and refreshing the page, but both fail and either give a different error message or the same.
Solution 1:[1]
Replit has a built in method for doing this, click on the cube on the left called "packager" and then search for packages there
Solution 2:[2]
This is a terrible issue I encountered by accident, the way I fixed it was by downloading the repl as a zip and then making a new one and putting the files into the new repl.
I assume it's a repl issue not a code issue, so you're probably going to be unable to use that repl for any code.
Also, if you have any modules that you are importing that don't work, you may want to remove the import statements for those modules before putting the code into a new repl.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | user1247198 |
Solution 2 | Bean Man |