nest2D
nest2D copied to clipboard
How do I install nest2D
I am trying to install nest2D with pip install nest2D
but it doesn't work.
here is some of the output I get when trying to install
-- Found PythonInterp: C:/Users/hanan/AppData/Local/Programs/Python/Python36/python.exe (found version "3.6.8")
-- Found PythonLibs: C:/Users/hanan/AppData/Local/Programs/Python/Python36/libs/Python36.lib
-- pybind11 v2.4.dev4
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
CMake Error at C:/Program Files/CMake/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
Clipper library cannot be found. Consider set CLIPPER_PATH environment
variable (missing: CLIPPER_LIBRARIES)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:445 (_FPHSA_FAILURE_MESSAGE)
lib/libnest2d/cmake_modules/FindClipper.cmake:67 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
lib/libnest2d/cmake_modules/RequirePackage.cmake:252 (find_package)
lib/libnest2d/include/libnest2d/backends/clipper/CMakeLists.txt:3 (require_package)
I have installed clipper with cmake .
and cmake --build . --target install
I have tried setting the environment variable CLIPPER_PATH with set CLIPPER_PATH=C:/Program Files (x86)/polyclipping
but it still doesn't work
I am using windows and Visual Studio Build tools 2019
I had some luck adding '-DRP_ENABLE_DOWNLOADING=on'
to this line of the setup.py file:
cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir,
'-DPYTHON_EXECUTABLE=' + sys.executable,
'-DRP_ENABLE_DOWNLOADING=on']
and installing the package from source via pip install -e .
. That flag makes the underlying libnest2d
library install any missing C dependencies (see here). BTW I did this on a Mac.
@EthanRosenthal answer worked for me in Ubuntu 18.04 and Python3. Running the simple_sample.py successfully generated the out.svg file. Thank you a lot!