Closed Dpksrndrn closed 5 years ago
Thanks for the report!
I heard the same thing earlier this week, it seems like CMake is wrong about MSVC's capabilities. It bases those off of a list, rather than testing the compiler for specific features. Last night I made this commit to address the issue, but it's not yet merged into master because I don't have MSCV available myself to test it.
You can safely delete the line in the CMakeLists.txt file that generates the error (line number 42), and you'll be able to compile the library.
If you are familiar with git and willing to help, you could cherry-pick this commit (aabe6029635a3a90208622afd047ac71445b2e13) and try it out.
We would very much appreciate to hear of any other issues you come across!
Thanks @crisluengo. That seemed to fix that error, but on subsequent running I am now getting : "CMake Error at dependencies/pybind11/CMakeLists.txt:74 (add_subdirectory): add_subdirectory given source "tests" which is not an existing directory." as an error message. All I am trying to do is to install pydip, would I still need to install diplib or is there a better way to go about this ?
I am relatively new to git so I am not sure if I can be of much help.
Thanks
@Dpksrndrn: That is strange. In your CMake configuration, PYBIND11_TEST
should be off. Can you see this setting in the CMake program?
@erikschuitema : I am not sure what you mean by CMake configuration. When I click on the configure button in the GUI, the program starts to configure, I am not able to change anything in that process. I don't see any other settings in the program
@Dpksrndrn: You should see something similar to this: https://www.paraview.org/Wiki/File:Brpv_cmakesetup.png (this is for a different project, it's just an example image I found online). In that list of "Cache Values", do you see PYBIND11_TEST
?
@Dpksrndrn: I have just pushed a fix for the "Your compiler does not support relaxed constexpr functions" error, and one that should fix this new error too. Please pull the changes and try building again.
Thanks for helping us out!
Thank you so much for the fix @crisluengo. I was able to run the install for PyDIP and got the following message on Visual Studio: "1>------ Build started: Project: INSTALL, Configuration: Debug x64 ------ 1>-- Install configuration: "Debug" 1>-- Installing: C:/Users/Deepak.Surendran/Anaconda3/pkgs/python-3.7.0-hea74fb7_0/Lib/site-packages/PyDIP/PyDIP_bin.cp37-win_amd64.pyd 1>-- Installing: C:/Users/Deepak.Surendran/Anaconda3/pkgs/python-3.7.0-hea74fb7_0/Lib/site-packages/PyDIP/PyDIP_py.py 1>-- Installing: C:/Users/Deepak.Surendran/Anaconda3/pkgs/python-3.7.0-hea74fb7_0/Lib/site-packages/PyDIP/init.py ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped =========="
When I try to import the library on Python however, I get a module not found error. Do you think there was an issue in my installation procedure or something else may be wrong?
Ps. I am able to locate the 'init', 'PyDIP_bin.cp37-win_amd64', 'PyDIP_py' files under Python3.7>Lib>site-packages>PyDIP
@Dpksrndrn, please try typing this in Python:
import os
os.environ["PATH"] += os.pathsep + "C:/Program Files (x86)/DIPlib/lib"
import PyDIP as dip
Let me know if this works, I'll add a note to the README file.
(Reference: Stack Overflow -- Platform independent way to modify PATH environment variable)
I installed the 64Bit version of the library, so I removed the (x86) from your code, but I still cannot seem to get it to work. Are you sure it has nothing to do with PyDIP getting installed in "Debug" configuration? Also, I do not need to use pip at all right ?
Thanks
@Dpksrndrn, in your first post is said:
Library installed to: C:/Program Files (x86)/DIPlib/lib
If that is where the library is, than that is the directory you need to add to your PATH
. Your file PyDIP_bin.cp37-win_amd64.pyd
is a DLL that depends on DIP.dll
in that directory. If you installed to a different directory, then fill in the name of that instead.
Yes, don't use pip
. This might have something to do with Anaconda, let me see how they handle packages. The instructions I wrote for Windows I tried out with a plain installation of Python 3. This seems to be the main difference of your environment with the one I used.
I am sorry for the confusion. I think I was trying to use a different generator to see if that was the source of error. Thank you so much for helping out
I don't know if it makes a difference, but I have a DIP.lib , not DIP.dll in the specified directory.
Does the CMake configuration report state "Building shared library"? Or does it say "Building static library"? In the former case, there must be a DIP.dll
file somewhere. In the latter case, your PyDIP_bin.cp37-win_amd64.pyd
file would be self-contained, and not depend on any non-system DLLs.
You can always use the Dependency Walker: open your PyDIP_bin.cp37-win_amd64.pyd
file in it, it will tell you what other shared libraries it depends on, and whether the system can find them. This should tell you whether the DIP.dll
file is required or not.
Anaconda uses "environments", make sure the right one is activated. I'm not sure how to check this. But within Python, you can type:
import sys
sys.path
This would tell you what directories are on your Python module search path. Make sure that C:/Users/Deepak.Surendran/Anaconda3/pkgs/python-3.7.0-hea74fb7_0/Lib/site-packages/
, where PyDIP is installed, is on that path.
The CMake Configuration report says "Building Shared Library". When I use the Dependency Walked, I get the following error messages:
Error: At least one required implicit or forwarded dependency was not found. Warning: At least one delay-load dependency module was not found. Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.
Yes, I can see the specified path on using those commands
Could you show us the output of all of the following commands?
First start the Anaconda Prompt
and enter:
$ where python
$ python
Then inside python:
>>> import os
>>> os.environ['PATH']
>>> import sys
>>> sys.path
If the PATH
variable shows the location with DIP.dll
and the sys.path
shows the location of the PyDIP
package you should be able to import the package:
>>> import PyDIP as dip
You can add the location of DIP.dll
directly in the Windows Environment Variables or as described by Cris above inside python. The package location can be added with sys.path.append(<PyDIP-location>)
Hi @ronligt and @crisluengo , Thank you so much for your patience and assistance. It seems the issue was the package location was not added. I am able to import the library now.
Hi @ronligt, @crisluengo ,
I was trying to reinstall the module with some of the dependencies installed, but am not able to import the module despite having the files in the correct locations. Here are the screenshots requested before:
Are the new dependencies also in the directories listed by os.environ['PATH']
?
For example, if you installed FFTW and DIPlib links to it, then the FFTW DLL needs to be found when importing PyDIP. The FFTW DLL thus must be in a directory listed on the PATH
.
The DIPlib/PyDIP installation script does not install any of the dependencies, it assumes they are already properly installed. But under Windows there is an odd definition of "properly installed". I must confess I haven't used Windows very much over the last 15 years or so...
@crisluengo, Thanks, I added the DLL's of the dependencies and that seems to have fixed the problem
Hi,
I am trying to build the DipLib Library to install the PyDip Library. I get the following error while trying to build DipLib using Cmake version 3.13.2 with a Visual Studio 15 2017 Win64 Generator. Even though the compiler version is 19.16, I get the following error message "Your compiler does not support relaxed constexpr functions. You need a compiler with full C++14 support to build DIPlib."
Please find the entire Cmake log below. I would appreciate any help on this.
Thanks