-
Notifications
You must be signed in to change notification settings - Fork 2
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
Can't move the build/Release/bin folder into a new location #29
Comments
hi mborus, i never tried this. but i will try to reproduce... as a first guess: i tried to link almost all statically to avoid such problems, but the modules containing the generated u_flex stuff are shared libs, because they would get duplicated symbols otherwise for different versions. i think you could try to move the ticket_detector folder to your target location and then you could try to append LD_LIBRARY_PATH to point to the folder containing the libs. i guess python has some mechanism for this, because i think other python modules might have shared lib dependencies as well. but i don't know exactly right now. |
i think i know whats going on and why you are facing this behavior now. the setup.Python.sh script exports the PYTHONPATH env var after build ticket-decoder/setup.Python.sh Line 12 in 108d756
or the PYTHONPATH is specified manually somehow to point to this location. so even when you copy the directory of the package to your separated venv, the PYTHONPATH still points to /build/Release/bin and uses the ticket_decoder module and/or the shared libs from this path. when you change the structure, it's unable to discover the shared libs on load. for temporary use, you can re-define the PYTHONPATH env var to point to another location, but this location should be structured like this:
this should at least work to get it running with but honestly, this is error prone and - for sure - not the normal way to install python modules. so when i have some time for this, i will try to provide the requirements get it installed via setuptools and stuff like this. contributions welcome |
Hi - thanks for writing this library.
I'm trying to use the Python connection to just decode the binary content on of the bar code on a Debian system and it works decoding the bar codes.
These are the steps taken
I then copied the "bin" folder into the current virtual environment "/venv_bahn/bin" - which let me import
from ticket_decoder import DecoderFacade
as long as I manually put this folder on the path. I usedsys.path.append("/home/<removed>/venv_bahn/bin")
to do this.However, as soon as I remove/rename the created "build/Release/bin" folder from my home directory, the import no longer works. This is the error.
Changing the name back fixes the problem. So I need to keep the build files in my home directory permanently.
Is there a way to move the ticket-decoder inside a virtual environment so that I can delete the files used to build it?
The text was updated successfully, but these errors were encountered: