Well, I was finally able to document all the packages and dependencies for python3.11. I want to share with you my progress to be able to better guide us to the solution since I believe that the way you did the installation is different from mine and that could give us different approaches. Firstly, I will share the installation steps with you:
-Jail 13.3-RELEASE-p4 (TrueNas)
-Python3.11
-Paperless 2.10.2
I leave you the commands, there should be no failure when trying to follow them:
### Actualizando sistema
pkg update
pkg upgrade
### Instalacion de paquetes:
pkg install cmake expect gcc ghostscript10 git gnupg icc-profiles-adobe-cs4 icc-profiles-basiccolor icc-profiles-openicc ImageMagick7-nox11 leptonica liberation-fonts-ttf libxslt libxml2 lzlib mime-support pngquant poppler-utils qpdf redis rust sqlite sqlite3 tesseract tesseract-data unpaper zbar zlib-ng zxing-cpp python311 py311-setuptools py311-wheel py311-numpy py311-cython openblas py311-gdbm py311-sqlite3 py311-tkinter
### Creacion de usuario y carpetas
pw groupadd paperless
pw useradd paperless -g paperless -s /bin/sh
mkdir -p /usr/home/paperless
chown -R paperless:paperless /usr/home/paperless
ln -sf /usr/home /home
install -g paperless -o paperless -d /usr/home/paperless/media
install -g paperless -o paperless -d /usr/home/paperless/data
install -g paperless -o paperless -d /usr/home/paperless/consume
install -g paperless -o paperless -d /usr/home/paperless/static
install -g paperless -o paperless -d /usr/home/paperless/trash
## ImageMagick
sed -i "" -e '/PDF/s/rights="none"/rights="read|write"/' /usr/local/etc/ImageMagick-7/policy.xml
## Redis
service redis enable
service redis start
## Paperless Fetch & Extract
fetch https://github.com/paperless-ngx/paperless-ngx/releases/download/v2.10.2/paperless-ngx-v2.10.2.tar.xz
tar -xvzf paperless-ngx-v2.10.2.tar.xz
mv paperless-ngx /usr/home/paperless
cd /usr/home/paperless/paperless-ngx
### Configuracion de paperless
ee paperless.conf
PAPERLESS_REDIS=redis://localhost:6379
PAPERLESS_DBENGINE=sqlite
PAPERLESS_CONSUMPTION_DIR=/usr/home/paperless/consume
PAPERLESS_DATA_DIR=/usr/home/paperless/data
PAPERLESS_TRASH_DIR=/usr/home/paperless/trash
PAPERLESS_MEDIA_ROOT=/usr/home/paperless/media
PAPERLESS_SECRET_KEY=Xyfd4Frfdfg4GFdo0Z0ny5c3
PAPERLESS_OCR_LANGUAGE=spa
PAPERLESS_CONVERT_BINARY=/usr/local/bin/convert
PAPERLESS_GS_BINARY=/usr/local/bin/gs
PAPERLESS_TIME_ZONE='America/Mexico_City'
### Intalacion de pip y configuracion de enlaces simbolicos
python3.11 -m ensurepip
python3.11 -m ensurepip --upgrade
ln -s /usr/local/bin/python3.11 /usr/local/bin/python3
ln -s /usr/local/bin/pip3.11 /usr/local/bin/pip3
### Paquetes pip dentro del usuario "paperless"
su - paperless
pip3 install anyio asgiref==3.7.2 channels channels-redis click click-didyoumean click-plugins click-repl concurrent-log-handler dateparser django-celery-results django-compression-middleware django-filter django-extensions django-guardian djangorestframework-guardian flower imap-tools inotifyrecursive pathvalidate pdf2image python-ipware pyzbar tika-client drf-writable-nested django-multiselectfield python-dotenv whitenoise django-cors-headers django-allauth django-auditlog django-soft-delete python-magic filelock langdetect packaging tqdm whoosh pikepdf img2pdf python-gnupg setuptools wheel watchdog ocrmypdf
**CASO ESPECIAL (tarda en instalarse como 1h 30m)
pip3 install git+https://github.com/scikit-learn/scikit-learn.git
#### Setup
cd /usr/home/paperless/paperless-ngx/src
/usr/local/bin/python3 manage.py migrate
/usr/local/bin/python3 manage.py createsuperuser
/usr/local/bin/python3 manage.py runserver
#### Iniciar y probar servicios
python3 manage.py runserver 0.0.0.0:8000
python3 manage.py document_consumer
python3 -m celery --app paperless worker --loglevel INFO
python3 -m celery --app paperless beat --loglevel INFO
### Ejecutar todos los servicios en segundo plano
su - paperless
cd /usr/home/paperless/paperless-ngx/src
/usr/local/bin/python3 manage.py runserver 0.0.0.0:8000 &
/usr/local/bin/python3 manage.py document_consumer &
/usr/local/bin/python3 -m celery --app paperless worker --loglevel INFO &
/usr/local/bin/python3 -m celery --app paperless beat --loglevel INFO &
Finally the error when trying to upload a file is:
[2024-07-09 10:07:35,758] [ERROR] [paperless.tasks] ConsumeTaskPlugin failed: Examen_Desarrollo.pdf: Error occurred while consuming document Examen_Desarrollo.pdf: PermissionError: [Errno 13] Permission denied: 'jbig2'
Traceback (most recent call last):
File "/usr/home/paperless/paperless-ngx/src/paperless_tesseract/parsers.py", line 368, in parse
ocrmypdf.ocr(**args)
File "/home/paperless/.local/lib/python3.11/site-packages/ocrmypdf/api.py", line 380, in ocr
return run_pipeline(options=options, plugin_manager=plugin_manager)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/paperless/.local/lib/python3.11/site-packages/ocrmypdf/_pipelines/ocr.py", line 223, in run_pipeline
return _run_pipeline(options, plugin_manager)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/paperless/.local/lib/python3.11/site-packages/ocrmypdf/_pipelines/ocr.py", line 190, in _run_pipeline
optimize_messages = exec_concurrent(context, executor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/paperless/.local/lib/python3.11/site-packages/ocrmypdf/_pipelines/ocr.py", line 145, in exec_concurrent
pdf, messages = postprocess(pdf, context, executor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/paperless/.local/lib/python3.11/site-packages/ocrmypdf/_pipelines/_common.py", line 427, in postprocess
return optimize_pdf(pdf_out, context, executor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/paperless/.local/lib/python3.11/site-packages/ocrmypdf/_pipeline.py", line 979, in optimize_pdf
output_pdf, messages = context.plugin_manager.hook.optimize_pdf(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/paperless/.local/lib/python3.11/site-packages/pluggy/_hooks.py", line 513, in __call__
return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/paperless/.local/lib/python3.11/site-packages/pluggy/_manager.py", line 120, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/paperless/.local/lib/python3.11/site-packages/pluggy/_callers.py", line 139, in _multicall
raise exception.with_traceback(exception.__traceback__)
File "/home/paperless/.local/lib/python3.11/site-packages/pluggy/_callers.py", line 103, in _multicall
res = hook_impl.function(*args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/paperless/.local/lib/python3.11/site-packages/ocrmypdf/builtin_plugins/optimize.py", line 151, in optimize_pdf
'jbig2': jbig2enc.available(),
^^^^^^^^^^^^^^^^^^^^
File "/home/paperless/.local/lib/python3.11/site-packages/ocrmypdf/_exec/jbig2enc.py", line 22, in available
version()
File "/home/paperless/.local/lib/python3.11/site-packages/ocrmypdf/_exec/jbig2enc.py", line 17, in version
return Version(get_version('jbig2', regex=r'jbig2enc (\d+(\.\d+)*).*'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/paperless/.local/lib/python3.11/site-packages/ocrmypdf/subprocess/__init__.py", line 158, in get_version
proc = run(
^^^^
File "/home/paperless/.local/lib/python3.11/site-packages/ocrmypdf/subprocess/__init__.py", line 62, in run
proc = subprocess_run(args, env=env, check=check, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/subprocess.py", line 548, in run
with Popen(*popenargs, **kwargs) as process:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/subprocess.py", line 1026, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/local/lib/python3.11/subprocess.py", line 1955, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: 'jbig2'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/paperless/.local/lib/python3.11/site-packages/asgiref/sync.py", line 349, in main_wrap
raise exc_info[1]
File "/usr/home/paperless/paperless-ngx/src/documents/consumer.py", line 577, in run
document_parser.parse(self.working_copy, mime_type, self.filename)
File "/usr/home/paperless/paperless-ngx/src/paperless_tesseract/parsers.py", line 435, in parse
raise ParseError(f"{e.__class__.__name__}: {e!s}") from e
documents.parsers.ParseError: PermissionError: [Errno 13] Permission denied: 'jbig2'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/home/paperless/paperless-ngx/src/documents/tasks.py", line 151, in consume_file
msg = plugin.run()
^^^^^^^^^^^^
File "/usr/home/paperless/paperless-ngx/src/documents/consumer.py", line 608, in run
self._fail(
File "/usr/home/paperless/paperless-ngx/src/documents/consumer.py", line 302, in _fail
raise ConsumerError(f"{self.filename}: {log_message or message}") from exception
documents.consumer.ConsumerError: Examen_Desarrollo.pdf: Error occurred while consuming document Examen_Desarrollo.pdf: PermissionError: [Errno 13] Permission denied: 'jbig2'