This error occurs when using the official instance code of jpegturbo. Record the solution.
Environment introduction
ubuntu 16.04
conda
python3.7
Error details
Traceback (most recent call last):
File "/home/ubuntu/PycharmProjects/python_code_test/JPEGTurbo/official_demo1.py", line 30, in <module>
turbo_jpeg = TurboJPEG()
File "/home/ubuntu/.conda/envs/pytorch-1.7/lib/python3.7/site-packages/turbojpeg.py", line 286, in __init__
self.__find_turbojpeg() if lib_path is None else lib_path)
File "/home/ubuntu/.conda/envs/pytorch-1.7/lib/python3.7/site-packages/turbojpeg.py", line 895, in __find_turbojpeg
'Unable to locate turbojpeg library automatically. '
RuntimeError: Unable to locate turbojpeg library automatically. You may specify the turbojpeg library path manually.
e.g. jpeg = TurboJPEG(lib_path)
Solution
sudo apt-get update -y
sudo apt-get install -y libturbojpeg
References
PyTurboJPEG · PyPI
https://github.com/lilohuang/PyTurboJPEG/issues/27
Read More:
- Linux novice: unable to locate package error solution
- nbconvert failed: xelatex not found on PATH, if you have not installed xelatex you may need to do so
- E: unable to locate package MySQL server error solution
- Solutions to the problem of unable to locate package
- Unable to locate executable for jre1.8.0_261
- RuntimeError: Unable to find a valid cuDNN algorithm to run convolution
- Solve the problem of unable to locate package python3.6 when upgrading from python3.5 to python3.6 in ubantu16.04
- An unable to locate appropriate constructor on class solution appears
- 0001: unable to locate the content swf directory: app:/mod/win
- Centos7 solves the problem of unable to use tab to complete automatically
- The NPF driver isn’t running. You may have trouble capturing or listing interfaces
- You may need an appropriate loader to handle this file type, currently no loaders are configured to
- 2021-07-03module parse failed: unexpected token (763:13) you may need an appropriate loader to
- Android Studio – automatically opens the latest project every time you open as
- Module parse failed:Unexpectedtoken (1:0)You may need an appropriate loader to handle this file type
- Error:Unknown host ‘maven.aliyun.com‘. You may need to adjust the proxy settings in Gradle.
- Error: Could not locate Flask application. You did not provide the FLASK_APP environment variable.
- java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @Context
- [Solved] VUE Error: “You may use special comments to disable some warnings.Use // eslint-disable-next-line to …
- Solution: unable to delete folder (you need permission to perform this operation)