파이썬 공부

bpy 패키지 설치

시도하고 시도 2022. 7. 8. 22:44

블랜더와 파이썬을 연결하는 패키지인데, pip를 통해 설치하려다 데인 사람들이 또 있을 것 같아 도움이 되었으면 하며 적어본다.

 

우선 

1. 파이썬 버전은 반드시 3.7이어야 한다.

2. 그리고 뜨는 에러, error: subprocess-exited-with-error

이때엔 pip install future_fstrings

3. 그리고 pip install bpy 를 하면 building wheel for bpy (setup.py) ... 하고 멈출 것이다.

19kb짜리 패키지 이기 때문에 오류가 난거다. 

참고로, 이렇게 무슨 일이 일어나는지 모르는 상황에서는 해당 설치과정에서 멈춘 문장을 검색하거나,,,

pip install bpy -vvv 로 자세한 현황을 파악한다.

4. 생략하고, future_fstrings를 설치했다면, pip install bpy==2.91a0  && bpy_post_install 를 했더니 나는 깔렸다.

 

이걸 어떻게 찾았을까?

 

 $ pip install bpy -vvv
 Using pip 22.0.4 from /home/ict-526/anaconda3/envs/neucon/lib/python3.7/site-packages/pip (python 3.7)
 Non-user install because site-packages writeable
 Created temporary directory: /tmp/pip-ephem-wheel-cache-5m7__7ma
 Created temporary directory: /tmp/pip-req-tracker-23rosrys

.....

.....(생략)

  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.7
  creating build/lib.linux-x86_64-3.7/blenderpy
  copying blenderpy/__init__.py -> build/lib.linux-x86_64-3.7/blenderpy
  copying blenderpy/pre_uninstall.py -> build/lib.linux-x86_64-3.7/blenderpy
  copying blenderpy/post_install.py -> build/lib.linux-x86_64-3.7/blenderpy
  running build_ext
  Preparing the build environment
  Searching for compatible Blender online (this will take a while)
  /home/ict-526/anaconda3/envs/neucon/lib/python3.7/site-packages/pkg_resources/__init__.py:125: PkgResourcesDeprecationWarning: softbody-stable-v1 is an invalid version and will not be supported in a future release
    PkgResourcesDeprecationWarning,
  /home/ict-526/anaconda3/envs/neucon/lib/python3.7/site-packages/pkg_resources/__init__.py:125: PkgResourcesDeprecationWarning: softbody-stable-v2 is an invalid version and will not be supported in a future release
    PkgResourcesDeprecationWarning,
  /home/ict-526/anaconda3/envs/neucon/lib/python3.7/site-packages/pkg_resources/__init__.py:125: PkgResourcesDeprecationWarning: softbody-stable-v3 is an invalid version and will not be supported in a future release
    PkgResourcesDeprecationWarning,

 

어디서 멈췄는지 파악을 해보자. 반복되는 행동 직전,   Searching for compatible Blender online (this will take a while) 이것을 계속 하고있었을 것이다.

이 에러문구를 검색하면, 아래와 같은 참고 문헌이 나오고, 덕분에 해결했다.

 

참고

https://github.com/TylerGubala/blenderpy/issues/109

 

Searching for compatible Blender online (this will take a while) · Issue #109 · TylerGubala/blenderpy

I don't know why install a lib need searching some dependencies online? Searching for compatible Blender online (this will take a while) I have sintalled blender-pybuilder

github.com