Mathux / TEMOS

Official PyTorch implementation of the paper "TEMOS: Generating diverse human motions from textual descriptions", ECCV 2022 (Oral)
https://mathis.petrovich.fr/temos/
MIT License
378 stars 25 forks source link

for visualization, the ensurepip doesn't work #27

Closed ShungJhon closed 1 year ago

ShungJhon commented 1 year ago

I tried to use snap to install the blender 2.93lts/stable. And I've used /path/to/blender/python -m ensurepip --upgrade. It returned as follows:

Defaulting to user installation because normal site-packages is not writeable
Looking in links: /tmp/tmp30yem5vm
Requirement already up-to-date: setuptools in /home/vatis/.local/lib/python3.9/site-packages (49.2.1)
Requirement already up-to-date: pip in /home/vatis/.local/lib/python3.9/site-packages (20.2.3)

It seems that pip was installed in the system python but not this builtin python. Because when I used: blender --background --python-expr "import pip" It returned:

Blender 2.93.15 (hash 2888f351e535 built 2023-02-21 00:33:31)
Read prefs: /home/vatis/.config/blender/2.93/config/userpref.blend
Error: Python: Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pip'

location: <unknown location>:-1

Python: Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pip'

location: <unknown location>:-1

Blender quit

But all these worked for me when I followed your instruction on my mac. Did you know any solution to these? THX

Mathux commented 1 year ago

Hello @ShungJhon ,

It seems that pip is installed locally (in your "/home/vatis/.local" folder). Maybe you don't have write permissions to install it system wise (in the blender folder).

When you use the command: blender --background --python-expr "import pip", it did not load your local python libraries. To load pip library in the python, you should tell python to access this local folder like this:

import sys
sys.path.append("/home/vatis/.local/lib/python3.9/site-packages")
# Then you can load pip
import pip

Tell me if it works

Best,

ShungJhon commented 1 year ago

@Mathux Thank you very much. It worked.