<@ULVA73B9P> It seems prefect doesn't work as I ex...
# ask-marvin
k
@Marvin It seems prefect doesn't work as I expect:
Copy code
$ uv pip install "prefect==3.4.23"
Using Python 3.10.12 environment at: .../py310
Resolved 95 packages in 413ms
Installed 1 package in 41ms
 + prefect==3.4.23
$ python                                                          
Python 3.10.12 (main, Aug 15 2025, 14:32:43) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
Ctrl click to launch VS Code Native REPL
>>> from prefect import task
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'task' from 'prefect' (.../py310/lib/python3.10/site-packages/prefect/__init__.py)
>>>
so I install prefect, but I can't import task (or flow or ...). However, I can import form other packages:
Copy code
>>> from prefect.futures import PrefectConcurrentFuture
>>> from prefect.testing.utilities import prefect_test_harness

>>> 
>>> from prefect.client.schemas import StateType
>>>
n
do you have a file locally called
prefect.py
?
k
no, I don't - but yeah that would've made sense.
n
hmm that seems like some sort of python environment corruption, not sure what kind
k
yeah, I can't figure it out. it's pretty weird.
@Marvin ^- any idea