Hi Bruno,

Thanks for the advice. 

It's my understanding that compiling boost.python code outputs a shared 
object file (in this case, I'm guessing something like PyDealII/Debug.so) 
which can be loaded as a module by a python interpreter (in this case by 
adding the shared object location to the PYTHONPATH). Running 'find' in my 
build directory, I was unable to find the shared object file.

Digging deeper, I found that the actual flag is 
-DDEAL_II_COMPONENT_PYTHON_BINDING*S*=ON, so I hadn't built the library 
with the correct configuration. Attempting to build the python bindings, 
the build of deal.ii fails, with the following error

```
-- Setting up python bindings
-- Found PythonInterp: /usr/bin/python (found version "2.7.18") 
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found 
version "2.7.18") 
CMake Error at 
/usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 
(message):
  Could NOT find Boost (missing: python27) (found suitable version "1.71.0",
  minimum required is "1.67")
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 
(_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.16/Modules/FindBoost.cmake:2179 
(find_package_handle_standard_args)
  contrib/python-bindings/CMakeLists.txt:46 (_FIND_PACKAGE)
```

I'm confused by this--I've installed boost and the build process finds it, 
but I don't know why it's looking for Python 2.7, I have more recent system 
versions (namely, 3.8) in the same directory. I imagine this might be 
causing the issue with Boost, and I wouldn't be developing bindings for 
python 2 anyway, as it's not supported. I'm using an Ubuntu 18.04 machine 
and attempting to install deal.ii-9.3.3. Am I building this the wrong way? 

Thank you,
Corbin

On Tuesday, April 19, 2022 at 4:37:11 PM UTC-4 [email protected] wrote:

> Corbin,
>
> On Tuesday, April 19, 2022 at 3:04:39 PM UTC-4 [email protected] wrote:
>
>> I've built deal.ii version 9.3.0 with the 
>> -DDEAL_II_COMPONENT_PYTHON_BINDING=ON configuration, yet when I run the 
>> notebook, the Jupyter kernel is unable to locate the PyDealII module, that 
>> is, the notebook cell
>>
>> > import PyDealII.Release as dealii
>>
>> fails with an import error.
>>
> I havent' use the python binding in a while but you probably need to set 
> the PYTHONPATH to where pydealii is located. You may also need to add the 
> path to libdealii.so to LD_LIBRARY_PATH
>
> Where is this library located, and how should I go about setting up a 
>> (conda) environment to be able to use PyDealII? Are there dependencies?
>>
> The library should be located in the same directory where you installed 
> deal.II. Look somewhere in /path/to/install/lib . I don't use conda so I 
> can't help you with that. What kind of dependencies are you talking about? 
> PyDealII only depends on deal.II and Boost.Python, nothing else
>
> Best,
>
> Bruno 
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/c39ec853-1838-4d02-84f6-15589fc1ecd8n%40googlegroups.com.

Reply via email to