Replit 未安装依赖项

问题描述 投票:0回答:2

在找到免费托管服务之前,我尝试使用replit作为在线主机作为临时解决方案。但是,当我尝试在那里安装依赖项时,我收到如下错误代码:

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

到目前为止,我只尝试过制作 venvs 并刷新页面,但都失败了,要么给出不同的错误消息,要么给出相同的错误消息。

python replit
2个回答
1
投票

Click on the cube ans search for it

Replit 有一个内置方法可以执行此操作,单击左侧称为“packager”的立方体,然后在那里搜索包


0
投票

这是我偶然遇到的一个可怕的问题,我修复它的方法是将 repl 作为 zip 下载,然后制作一个新的并将文件放入新的 repl 中。

我认为这是一个 repl 问题而不是代码问题,所以您可能无法将该 repl 用于任何代码。

此外,如果您要导入的任何模块不起作用,您可能需要在将代码放入新的 repl 之前删除这些模块的导入语句。

© www.soinside.com 2019 - 2024. All rights reserved.