Closed steve02081504 closed 1 month ago
Oh, sorry, don't install PyPI's depthflow, the wheel is empty. I once tried splitting all the projects in their own packages, but the easiest solution was to bundle everything in a single dependency broken-source
Perhaps I should mirror the main wheel on others, but that might cause some issues
This import error appears after doing so:
~
❯ cd /tmp
/tmp
❯ python -m venv venv
/tmp
❯ source ./venv/bin/activate.fish
/tmp via 🐍 v3.12.3 (venv)
❯ pip install --upgrade broken-source==0.3.1
(...)
/tmp via 🐍 v3.12.3 (venv)
❯ depthflow input -i ~/image.jpg main -o /tmp/depthflow.mp4
(...)
│DepthFlow ├┤5150ms├┤INFO │ ▸ Finished rendering (/tmp/depthflow.mp4)
│DepthFlow ├┤5151ms├┤INFO │ ▸ • Stats: (Took 3.96 s) at (151.08 FPS | 2.52 x Realtime) with (600 Total Frames)
/tmp via 🐍 v3.12.3 (venv) took 5s
❯ depthflow input -i ~/image.jpg main -o /tmp/depthflow.mp4
/tmp via 🐍 v3.12.3 (venv) took 5s
❯ depthflow input -i ~/image.jpg main -o /tmp/depthflow.mp4
(...)
cannot import name 'DEPTHFLOW' from 'DepthFlow' (/tmp/venv/lib/python3.12/site-packages/DepthFlow/__init__.py)
So, in your case, just pip uninstall depthflow
or remove it from pyproject.toml/requirements.txt
and sync :)
~ >pip uninstall depthflow
Found existing installation: depthflow 2024.1.15
Uninstalling depthflow-2024.1.15:
Would remove:
e:\python\lib\site-packages\depthflow-2024.1.15.dist-info\*
e:\python\lib\site-packages\depthflow\*
Would not remove (might be manually added):
e:\python\lib\site-packages\depthflow\CustomScene.py
e:\python\lib\site-packages\depthflow\DepthFlow.py
e:\python\lib\site-packages\depthflow\Resources\Images\DepthFlow.png
e:\python\lib\site-packages\depthflow\Resources\Images\DepthFlow.svg
e:\python\lib\site-packages\depthflow\Resources\Shaders\Deprecated\DepthFlow2D.frag
e:\python\lib\site-packages\depthflow\Resources\Shaders\Deprecated\DepthFlowMarch.frag
e:\python\lib\site-packages\depthflow\Resources\Shaders\DepthFlow.frag
e:\python\lib\site-packages\depthflow\__main__.py
Proceed (Y/n)? y
Successfully uninstalled depthflow-2024.1.15
~ >depthflow input -i C:\Users\steve02081504\Downloads\116018494_p0.png main
---------------------------------------------------------------------------------------
198 _run_module_as_main <frozen runpy>
(...)
ImportError:
cannot import name 'DEPTHFLOW' from 'DepthFlow' (unknown location)
I'm not quite sure what you mean by sync, this is what I get after deleting it
Either reinstall the package pip install --force-reinstall broken-source
, or delete the venv and start over
Explanation: Both depthflow
and broken-source
packages wrote site-packages/DepthFlow
on the venv
You probably installed first broken-source
, then depthflow
, which overwrote the broken-source
's extracted directory DepthFlow
with empty contents, then uninstalled depthflow
, removing the contents, so the "unknown location"
I'm not quite sure what you mean by sync
If you were using a project manager like Poetry, PDM, Rye, etc. to run poetry install
, pdm install
, rye sync
etc
Can ignore this if you're just doing a pip install inside a manually managed venv/scripts 👍🏻
it works, ty for help!