Comments (4)
I am having a similar problems. I have following the install instructions at https://github.com/AprilRobotics/apriltag#install
If I launch Python from the apriltag directory in which I installed from, then
from apriltag import apriltag
works fine.If I try to do this import from my application folder ('/app'; I'm running this in Docker), then it cannot find apriltag. I got an warning during
make install
that saidcp: cannot create regular file '/root/.local/lib/python3.7/site-packages': No such file or directory
which is probably related. Everything except the final site-packages folder exists. I didln -s /usr/local /root/.local
to get around this. Re-ranmake install
and no warning this time.Now I get a new error when trying to import:
Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: libapriltag.so.3: cannot open shared object file: No such file or directory
If I copy the /lib directory to my /app directory then the python import works. This isn't very clean and this step isn't in the install documentation, so I do not expect this to be the desired approach.
What should I do here? How is this supposed to work?
Thanks!
Hi, this is not a issue of the code. It's your environment.
just edit the ~/.bashrc add
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
then
source ~/.bashrc
and dont forget
sudo ldconfig
It may solve your problem
from apriltag.
Hi,
The library libapriltag.so.3.1.0 should be installed to your /lib folder after running the instruction for installing apriltag: https://github.com/AprilRobotics/apriltag#install
Does running these commands fix the problem?
from apriltag.
I am having a similar problems. I have following the install instructions at https://github.com/AprilRobotics/apriltag#install
If I launch Python from the apriltag directory in which I installed from, then from apriltag import apriltag
works fine.
If I try to do this import from my application folder ('/app'; I'm running this in Docker), then it cannot find apriltag. I got an warning during make install
that said cp: cannot create regular file '/root/.local/lib/python3.7/site-packages': No such file or directory
which is probably related. Everything except the final site-packages folder exists. I did ln -s /usr/local /root/.local
to get around this. Re-ran make install
and no warning this time.
Now I get a new error when trying to import:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: libapriltag.so.3: cannot open shared object file: No such file or directory
If I copy the /lib directory to my /app directory then the python import works. This isn't very clean and this step isn't in the install documentation, so I do not expect this to be the desired approach.
What should I do here? How is this supposed to work?
Thanks!
from apriltag.
Hey @cdb0y511,
That environment variable did the trick! I still needed the ln -s /usr/local /root/.local
though.
Here is my working dockerfile
:
FROM jjanzic/docker-python3-opencv:latest
ENV PYTHONUNBUFFERED 1
ENV PYTHONPATH "${PYTHONPATH}:/app"
# fix "ImportError: libapriltag.so.3: cannot open shared object file: No such file or directory"
# https://github.com/AprilRobotics/apriltag/issues/46
ENV LD_LIBRARY_PATH "/usr/local/lib:${LD_LIBRARY_PATH}"
WORKDIR /app
COPY . /app
RUN pip install --trusted-host pypi.python.org --upgrade pip \
&& pip install --trusted-host pypi.python.org -r requirements.txt \
&& git clone https://github.com/AprilRobotics/apriltag.git /home/apriltag \
&& cd /home/apriltag \
# fix missing site-packages in /root/.local/lib/python3.7/
&& ln -s /usr/local /root/.local \
&& cmake . \
&& make install
CMD python app/app.py
Ultimately it would be great if I could simply do pip install apriltag
and everything would just work. In the meantime, maybe some documentation updates would help other Python users get up and running.
from apriltag.
Related Issues (20)
- Improve documentation concerning estimated pose HOT 5
- What do the tag-specific hex codes in the c files represent?
- How to deal with tag36h9? HOT 1
- install problem HOT 5
- Clarify licensing HOT 1
- Geometric interpretation of estimation error HOT 2
- Help with thresholding parameters HOT 1
- How to run pose estimation in python ? HOT 3
- compatibility with WIN32_LEAN_AND_MEAN HOT 8
- Anyone implmented c# wrapper for this? HOT 1
- error when i run make in ubuntu 22.04 HOT 1
- Has anyone confirmed that this library can work on ESP32S3? HOT 3
- How to use intrinsics in Scaramuzza format to estimate the apriltag pose? HOT 3
- Suggestions on improving detections in low light conditions HOT 4
- Python bindings for apriltag_detect throws error when no detection is found HOT 5
- What's the meaning of 'apriltag.c:448: homography_compute2: Assertion `max_val_idx >= 0' failed.'? HOT 5
- Planned Python Package Index (PyPI) package? HOT 4
- Build fail on Ubuntu Noble in g2d.c: `last_quadrant` is used unitialized; treat-all-warnings-as-errors HOT 4
- How to detect AprilGrid? HOT 5
- (Python) 'Nthreads' is an invalid keyword argument for this function HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apriltag.