Add pip installation directions for pyembree
See original GitHub issueInstallation Instructions
System
OS: Windows 10 x64, Build 1909 Python: 3.8.10
Steps
- Install Embree v2.17.7 x64 via the
msi
installer
(NOTE: To date,
pyembree
still relies onEmbree 2
and has not been updated forEmbree 3
.)
- Install Microsoft Visual Studio 2015
(NOTE:
pyembree
requires version 2015. The errorerror: 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)
-
Install the Windows 10.0.19041.685 SDK
-
Install Poetry 1.1.7 via PowerShell
-
Create your project and initialize a virtual environment with
venv
and package management withpoetry
.
(NOTE: In this example, the virtual environment is contained in a folder named
.venv
within the project folder itself)
- Open a
VS2015 x64 Native Tools Command Prompt
as anAdministrator
. 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 theset
command is actually different inPowerShell
than what it is inCommand Prompt
.)
- Navigate to
<project_folder>\.venv\Lib\site-packages
and clone thepyembree
repo with the following command:
git clone https://github.com/scopatz/pyembree.git
- Activate appropriate build environment variables by running:
"%PROGRAMFILES(X86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
- Set the path to the
Embree
,Visual Studio
, andWindows SDK
include
andlib
files and tellmsbuild
to use theWindows_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.)
- 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:
- Created 2 years ago
- Comments:10 (9 by maintainers)
Top GitHub Comments
@akaszynski Thanks so much! Just joined! 😃
@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).