Ask coding questions

← Back to all posts
Not installing modules correctly?
PythCantCode

Hi there,
When I attempt to run my code, it installs the packages i a m using like always, but then returns this error:
--> python3 -m poetry install
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/poetry/main.py", line 5, in <module>
from .console import main
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/poetry/console/init.py", line 1, in <module>
from .application import Application
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/poetry/console/application.py", line 3, in <module>
from cleo import Application as BaseApplication
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/cleo/init.py", line 3, in <module>
from .application import Application
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/cleo/application.py", line 1, in <module>
from typing import Optional
File "/usr/lib/python3.8/typing.py", line 1998, in <module>
Pattern = _alias(stdlib_re.Pattern, AnyStr)
AttributeError: module 're' has no attribute 'Pattern'
exit status 1

Replit: Package operation failed.

Is there any fix for this?

Thank you,
PythCantCode

Voters
RLarge
KeaganLandfried
PythCantCode
Comments
hotnewtop
RLarge

You should give a link to the repl, or specifically the name of the file since it seems that you have just one repl with all your code in different files

PythCantCode

@RLarge The error happens in all my programs / files, ill link the repl below (yeah i know my code is sloppy):
https://replit.com/@PythCantCode/SchoolTest#rpc.py

RLarge

@PythCantCode I'm not sure if it will give you what you want, but try just importing print, meaning it would just say "import print"

KeaganLandfried

Can you link your repl?