Skip to content Skip to sidebar Skip to footer

Attempted Relative Import Beyond Top-level Package With Boost/python

I've tried multiple ways to import a module in a post here, but I decided to post a new question since that post was about boost not being able to find the module. Here's the struc

Solution 1:

Your path on Linux should be "/home/username/projectfiles/project/utilities/foo.py". You are missing the first /.

Solution 2:

I posted a similar question and the solution for that works here too (it was about trying to import a python module in C++ by using a relative path, I made a different post about it because it gave a completely different error). Basically I loaded the module in python and passed it as an argument to C++.

Post a Comment for "Attempted Relative Import Beyond Top-level Package With Boost/python"