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

How do I install nest2D #1

Open
hananf11 opened this issue May 4, 2020 · 4 comments
Open

How do I install nest2D #1

hananf11 opened this issue May 4, 2020 · 4 comments

Comments

@hananf11
Copy link

hananf11 commented May 4, 2020

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

@EthanRosenthal
Copy link

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.

@rluqueb
Copy link

rluqueb commented Feb 14, 2022

@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!

@shirishd27
Copy link

after apply the cmake process, still can't able to install nest2d.......... error occur ........
Screenshot 2024-07-24 161133

@EthanRosenthal
Copy link

You might need to install an earlier version of pypandoc. It's not pinned in this repo, so I'm guessing there was a breaking change with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants