Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't pip install bpy #24

Closed
ParastooJ opened this issue Aug 10, 2019 · 7 comments
Closed

can't pip install bpy #24

ParastooJ opened this issue Aug 10, 2019 · 7 comments
Labels
duplicate This issue or pull request already exists

Comments

@ParastooJ
Copy link

ParastooJ commented Aug 10, 2019

Hello,

When I try pip install bpy, I get the following error message. Do you know what this might be about. I am using python 3.7.3.

CMake Error at /home/parastooj/anaconda3/envs/emtoolschool/lib/python3.7/site-packages/cmake/data/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:137 (message):

Could NOT find PythonLibsUnix (missing: PYTHON_LIBRARY PYTHON_LIBPATH PYTHON_INCLUDE_DIR PYTHON_INCLUDE_CONFIG_DIR)
Call Stack (most recent call first):

/home/parastooj/anaconda3/envs/emtoolschool/lib/python3.7/site-packages/cmake/data/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
build_files/cmake/Modules/FindPythonLibsUnix.cmake:181 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
build_files/cmake/platform/platform_unix.cmake:83 (find_package)
CMakeLists.txt:899 (include)

Thanks!

@TylerGubala
Copy link
Owner

TylerGubala commented Aug 10, 2019

It looks like you are trying to install bpy in a Linux Environment. This is something I need help with because I don't have the time or resources to look into the linux builds (I code these repos on my"free time" i.e time in which I am not being paid and does nothing to aid in my livelihood).

It is related to this issue and really can be quite difficult to track down given the sheer number of possible Linux distributions.

Also, bpy only works on 3.6 variants of python (and even then only on Windows). It's a known issue that I am working to address on Windows referenced here.

It is possible to build the Blender runtime as a Python module but you will be required to follow the instructions here. Please let me know if you need any assistance in this effort.

@TylerGubala TylerGubala transferred this issue from TylerGubala/bpy-build Aug 10, 2019
@TylerGubala TylerGubala added the duplicate This issue or pull request already exists label Aug 10, 2019
@TylerGubala
Copy link
Owner

Can you please provide some additional details about the error you are facing?

What is your environment? Am I correct in assuming it is Linux? CPython?

If no additional details are provided in a week I am going to close the issue.

@TylerGubala
Copy link
Owner

Closing as no additional details were provided

@Rolandisimo
Copy link

Hi, I am on macOS Catalina 10.15.3. Installation errors out:

ERROR: Command errored out with exit status 1:
     command: /Users/rolands/Desktop/blender/env/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/34/s3rxmzvs6qg9pjtn29zgl3cc0000gp/T/pip-install-330kgjrz/bpy/setup.py'"'"'; __file__='"'"'/private/var/folders/34/s3rxmzvs6qg9pjtn29zgl3cc0000gp/T/pip-install-330kgjrz/bpy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/34/s3rxmzvs6qg9pjtn29zgl3cc0000gp/T/pip-install-330kgjrz/bpy/pip-egg-info
         cwd: /private/var/folders/34/s3rxmzvs6qg9pjtn29zgl3cc0000gp/T/pip-install-330kgjrz/bpy/
    Complete output (16 lines):
    Traceback (most recent call last):
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/tokenize.py", line 397, in find_cookie
        codec = lookup(encoding)
    LookupError: unknown encoding: future_fstrings

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/tokenize.py", line 449, in open
        encoding, lines = detect_encoding(buffer.readline)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/tokenize.py", line 436, in detect_encoding
        encoding = find_cookie(second)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/tokenize.py", line 405, in find_cookie
        raise SyntaxError(msg)
    SyntaxError: unknown encoding for '/private/var/folders/34/s3rxmzvs6qg9pjtn29zgl3cc0000gp/T/pip-install-330kgjrz/bpy/setup.py': future_fstrings
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Any chance this could be revived?

@Rolandisimo
Copy link

Rolandisimo commented Feb 11, 2020

UPDATE

Even though I am on python 3.7, I had to run these for the bpy installation to start:

  • pip install -U future-fstrings
  • pip install -U setuptools

@Rolandisimo
Copy link

Rolandisimo commented Feb 11, 2020

Failed to install. Log:

(env) ➜  env pip install bpy
Collecting bpy
  Using cached bpy-1.2.3.tar.gz (20 kB)
Building wheels for collected packages: bpy
  Building wheel for bpy (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/rolands/Desktop/blender/env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/34/s3rxmzvs6qg9pjtn29zgl3cc0000gp/T/pip-install-kt4rbbuk/bpy/setup.py'"'"'; __file__='"'"'/private/var/folders/34/s3rxmzvs6qg9pjtn29zgl3cc0000gp/T/pip-install-kt4rbbuk/bpy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/34/s3rxmzvs6qg9pjtn29zgl3cc0000gp/T/pip-wheel-5ogkfy00
       cwd: /private/var/folders/34/s3rxmzvs6qg9pjtn29zgl3cc0000gp/T/pip-install-kt4rbbuk/bpy/
  Complete output (44 lines):
  running bdist_wheel
  running build
  running build_ext
  Preparing the build environment
  Cloning Blender source from git://git.blender.org/blender.git
  Updating Blender git submodules
  Configuring cmake project
  cmake -H/Users/rolands/.blenderpy/blender -Bbuild/temp.macosx-10.14-x86_64-3.7 -DWITH_PLAYER=OFF -DWITH_PYTHON_INSTALL=OFF -DWITH_PYTHON_MODULE=ON
  -- The C compiler identification is AppleClang 11.0.0.11000033
  -- The CXX compiler identification is AppleClang 11.0.0.11000033
  -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
  -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
  -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
  xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
  CMake Error at build_files/cmake/platform/platform_apple_xcode.cmake:73 (string):
    string begin index: 6 is out of range 0 - 0
  Call Stack (most recent call first):
    CMakeLists.txt:564 (include)


  -- Detected OS X  and Xcode  at /Library/Developer/CommandLineTools
  CMake Error at build_files/cmake/platform/platform_apple_xcode.cmake:79 (if):
    if given arguments:

      "VERSION_LESS" "4.3"

    Unknown arguments specified
  Call Stack (most recent call first):
    CMakeLists.txt:564 (include)


  -- Configuring incomplete, errors occurred!
  See also "/private/var/folders/34/s3rxmzvs6qg9pjtn29zgl3cc0000gp/T/pip-install-kt4rbbuk/bpy/build/temp.macosx-10.14-x86_64-3.7/CMakeFiles/CMakeOutput.log".
  error: command 'cmake' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for bpy
  Running setup.py clean for bpy
Failed to build bpy
Installing collected packages: bpy
    Running setup.py install for bpy ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/rolands/Desktop/blender/env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/34/s3rxmzvs6qg9pjtn29zgl3cc0000gp/T/pip-install-kt4rbbuk/bpy/setup.py'"'"'; __file__='"'"'/private/var/folders/34/s3rxmzvs6qg9pjtn29zgl3cc0000gp/T/pip-install-kt4rbbuk/bpy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/34/s3rxmzvs6qg9pjtn29zgl3cc0000gp/T/pip-record-4032w71a/install-record.txt --single-version-externally-managed --compile --install-headers /Users/rolands/Desktop/blender/env/include/site/python3.7/bpy
         cwd: /private/var/folders/34/s3rxmzvs6qg9pjtn29zgl3cc0000gp/T/pip-install-kt4rbbuk/bpy/
    Complete output (44 lines):
    running install
    running build
    running build_ext
    Preparing the build environment
    Cloning Blender source from git://git.blender.org/blender.git
    Updating Blender git submodules
    Configuring cmake project
    cmake -H/Users/rolands/.blenderpy/blender -Bbuild/temp.macosx-10.14-x86_64-3.7 -DWITH_PLAYER=OFF -DWITH_PYTHON_INSTALL=OFF -DWITH_PYTHON_MODULE=ON
    -- The C compiler identification is AppleClang 11.0.0.11000033
    -- The CXX compiler identification is AppleClang 11.0.0.11000033
    -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
    -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
    -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
    xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
    CMake Error at build_files/cmake/platform/platform_apple_xcode.cmake:73 (string):
      string begin index: 6 is out of range 0 - 0
    Call Stack (most recent call first):
      CMakeLists.txt:564 (include)


    -- Detected OS X  and Xcode  at /Library/Developer/CommandLineTools
    CMake Error at build_files/cmake/platform/platform_apple_xcode.cmake:79 (if):
      if given arguments:

        "VERSION_LESS" "4.3"

      Unknown arguments specified
    Call Stack (most recent call first):
      CMakeLists.txt:564 (include)


    -- Configuring incomplete, errors occurred!
    See also "/private/var/folders/34/s3rxmzvs6qg9pjtn29zgl3cc0000gp/T/pip-install-kt4rbbuk/bpy/build/temp.macosx-10.14-x86_64-3.7/CMakeFiles/CMakeOutput.log".
    error: command 'cmake' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/rolands/Desktop/blender/env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/34/s3rxmzvs6qg9pjtn29zgl3cc0000gp/T/pip-install-kt4rbbuk/bpy/setup.py'"'"'; __file__='"'"'/private/var/folders/34/s3rxmzvs6qg9pjtn29zgl3cc0000gp/T/pip-install-kt4rbbuk/bpy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/34/s3rxmzvs6qg9pjtn29zgl3cc0000gp/T/pip-record-4032w71a/install-record.txt --single-version-externally-managed --compile --install-headers /Users/rolands/Desktop/blender/env/include/site/python3.7/bpy Check the logs for full command output.
(env) ➜  env

@TylerGubala
Copy link
Owner

@Rolandisimo If you are on MacOS, then please see this link

Please follow the discussion of the Mac platform at issue #2 ; I have not been able to push this out as a pip-installable due to various inconsistencies that I have faced with different platforms. I am hoping people with domain experience can assist in by contributing! I am primarily a Windows developer, so it's kind of like learning a foreign language for me.

Thanks for your patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants