question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add pip installation directions for pyembree

See original GitHub issue

Installation Instructions

System

OS: Windows 10 x64, Build 1909 Python: 3.8.10

Steps

  1. Install Embree v2.17.7 x64 via the msi installer

(NOTE: To date, pyembree still relies on Embree 2 and has not been updated for Embree 3.)

  1. Install Microsoft Visual Studio 2015

(NOTE: pyembree requires version 2015. The error

error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": 
https://visualstudio.microsoft.com/visual-cpp-build-tools/

is incorrect. The version of Visual Studio MUST be exactly version 2015. Search for version 2015 here under “Still want an older version?”, which will take you to https://my.visualstudio.com/Downloads. You must now have a Microsoft account to install older versions of Visual Studio). This will be an ISO file that you must mount and run the contained executable (be prepared for several hours of downloading and installing)

  1. Install the Windows 10.0.19041.685 SDK

  2. Install Poetry 1.1.7 via PowerShell

  3. Create your project and initialize a virtual environment with venv and package management with poetry.

(NOTE: In this example, the virtual environment is contained in a folder named .venv within the project folder itself)

  1. Open a VS2015 x64 Native Tools Command Prompt as an Administrator. Navigate to the <project_folder> and activate the virtual environment (.venv\Scripts\activate.bat)

(NOTE: The installation must be done in a command prompt terminal. Since we also need the build tools from VS2015, it is ideal to use the VS2015 x64 Native Tools Command Prompt. We need to set several environment variables and the set command is actually different in PowerShell than what it is in Command Prompt.)

  1. Navigate to <project_folder>\.venv\Lib\site-packages and clone the pyembree repo with the following command:
git clone https://github.com/scopatz/pyembree.git
  1. Activate appropriate build environment variables by running:
"%PROGRAMFILES(X86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
  1. Set the path to the Embree, Visual Studio, and Windows SDK include and lib files and tell msbuild to use the Windows_SDK when compiling by running the following:
set INCLUDE=C:\Program^ Files\Intel\Embree^ v2.17.7^ x64\include;C:\Program^ Files\Intel\Embree^ v2.17.7^ x64\include\embree2;C:\Program^ Files^ (x86)\Microsoft^ Visual^ Studio^ 14.0\VC\include;C:\Program^ Files^ (x86)\Windows^ Kits\10\Include\10.0.19041.0
set LIB=C:\Program^ Files\Intel\Embree^ v2.17.7^ x64\lib;C:\Program^ Files^ (x86)\Microsoft^ Visual^ Studio^ 14.0\VC\lib;C:\Program^ Files^ (x86)\Windows^ Kits\10\Lib\10.0.19041.0
set DISTUTILS_USE_SDK=1

(NOTE: The carets are necessary so Windows properly handles the spaces in the file paths. At the time of this writing, double-quotes did not work, but your mileage may vary.)

  1. Lastly, run
poetry run py setup.py install

If all goes according to plan, python will install pyembree in your virtual environment site-packages folder and finish with the statement:

Installed <project_folder>\.venv\lib\site-packages\pyembree-0.1.6-py3.8-win-amd64.egg
Processing dependencies for pyembree==0.1.6
Finished processing dependencies for pyembree==0.1.6

_Originally posted by @adamgranthendry in https://github.com/pyvista/pyvista-support/issues/468#issuecomment-882974167_

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
adamgranthendrycommented, Aug 2, 2021

@akaszynski Thanks so much! Just joined! 😃

0reactions
adam-grant-hendrycommented, Apr 28, 2022

@akaszynski We can probably close this issue now (adding install instructions to pyvista ) since you should be able to pip install pyembree now on all platforms now (only python 3.8 supported now).

Read more comments on GitHub >

github_iconTop Results From Across the Web

windows - CMake Build Help for `pyembree` - Stack Overflow
Install the following packages: py -m pip install numpy cython cmake ninja scikit-build wheel setuptools pyvista pykdtree. Add the following ...
Read more >
How to Install Pip on Windows - ActiveState
Click New, and add the directory where pip is installed, e.g. C:Python33Scripts, and select OK. How to Install Pip on Windows Environment ...
Read more >
embree - PyPI
If you install Embree using the MSI from Embree's website, the Embree binaries, headers, and libraries will all be installed to C:\Program ...
Read more >
FreshPorts -- graphics/py-pyembree: Python wrapper for Embree
${PYTHON_PKGNAMEPREFIX}pyembree>0:graphics/py-pyembree@${PY_FLAVOR}. No installation instructions: This port has been deleted. PKGNAME: py37-pyembree ...
Read more >
Installation — PyVista 0.37.0 documentation
PyVista can be installed from PyPI using pip : ... trimesh rtree pyembree ... please see our Contributing Guide and specifically, the Testing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found