Closed delfireinoso closed 5 months ago
At the end it mentions a failure to build hnswlib and what not...I think you need to install something that can build C++ like microsoft build tools, but I'm not sure what there is for MacOS, but I know this has worked for others. I added something like this for the instructions on my github readme...Let me know.
hnswlib it's on Homebrew brew install htslib
Done and if your script tests for his presence, I can go with it
I’ve installed hnswlip through Homebrew, no need to complile it
If your script tests for it It will be fine
El 9 feb 2024, a las 1:09, BBC-Esq @.***> escribió:
At the end it mentions a failure to build hnswlib and what not...I think you need to install something that can build C++ like microsoft build tools, but I'm not sure what there is for MacOS, but I know this has worked for others. I added something like this for the instructions on my github readme...Let me know.
— Reply to this email directly, view it on GitHub https://github.com/BBC-Esq/ChromaDB-Plugin-for-LM-Studio/issues/129#issuecomment-1935125121, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGYYPZOUD5KDC52EIFRPK2TYSVSNFAVCNFSM6AAAAABC4JLLJWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZVGEZDKMJSGE. You are receiving this because you authored the thread.
I've run all after installing hnswlip
Now the error is later:
Failed to build hnswlib
ERROR: Could not build wheels for hnswlib, which is required to install pyproject.toml-based projects
As the process is triing to buid hnswlip and not testing of it's presence I don't know if the wheels library is included
It's my understanding that when you pip install some libraries, sometimes it has to build those libraries that don't have wheels that are pre-built. In order to build some of the libraries, you have to have a compiler. Here are the instructions I put on my GitHub. I know they work for Windows, but I don't know how to ensure that a compiler exists on a Linux or a Mac OS system. I don't own those systems, so that's the challenge. But the error you're getting, I am familiar with.
If you find a definitive solution for MacOS please let me know and I'll add it to help other people.
Here is a link that another user posted awhile back. Most of the discussion is regarding Windows, but there's some tidbits for macOS as well:
Let me know what worked please.
I have the last Xcode installed, and the last Xcode command Line, I've installed GCC and the problem is the same:
pip install -r requirements.txt
falis onerror: command '/usr/bin/clang' failed with exit code 1
I'm not a programmer, but I see that this is the real problem. If you know anyone with a Mac running on perhaps has found a workaround
Unfortunately I don't, and can't troubleshoot myself since I don't have macos...At least I'm trying to make my program compatible with linux and macos instead of only Windows since that's what I have, right? ;-)
I understand you. I'll try to work on it Perhaps the problem is in the environment. So we'll work on it
I’ll try the Anaconda approach suggested in your linked page
If I can build the package I’ll make you know
on the link there is a discussion
Create a conda virtual environment : conda create -n localgpt python==3.10.0. install the hnswlib package first from [conda-forge](https://anaconda.org/conda-forge/hnswlib) : https://anaconda.org/conda-forge/hnswlib. Now install the requirements for your project using pip : pip install -r requirements.txt This should work fine, as packages form conda-forge dont build the wheels on your system.
What worked for you specifically? I might update the instructions but need step-by-step of the fix since I don't have Linux.
When I have finished the installation, I'll send you a detailed How-to
I have installed Anaconda and later I'll try to compile hnswlip (sorry it's slow try and error as I'm not a real programmer)
You'll be the first to know
Or you can do a pull request to modify the readme on my github page. Might be a good way to get your programming feet too. ;-)
I've reached this
I'll document later
Requirements
brew install portaudio
Alternate steps if the normal process fails unable to create hnswlip
Step 1
All Macs with MacOS 12.3+ come with 🔘 MPS (aka "Metal"), which is basically a dedicated portion of Apple CPUs that act as a GPU and provide gpu-acceleration similiar to Nvidia/AMD.
Step 2
Install Xcode Command Line Tools.
Install conda using Anaconda or miniconda https://www.anaconda.com/download
Step 3
Download the ZIP file from the latest "release" and extract the contents anywhere you want. DO NOT simply clone this repository...there may be incremental changes to scripts that will be undone inbetween official releases.
Step 4
Navigate to the src folder, open a command prompt, and create a virtual environment:
Step 5
Create a conda virtual environment :
conda create -n localgpt python==3.10.0
Step 6
install the hnswlib package first from conda-forge
`conda install conda-forge::hnswlib`
Step 7
`pip3 install torch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2`
Step 8
Install the requirements
`pip install -r requirements.txt `
Step 9
Upgrade PDF loader by running:
`python replace_pdf.py`
Optional Step 10
Run this script if you want to doublecheck that you installed the Pytorch and gpu-acceleration software correctly:
`python check_gpu.py
`
But running
'python gui.py'
on the root directory gives python: can't open file '/Users/delfireinososusagna/gui.py': [Errno 2] No such file or directory
Runing 'python gui.py' from /src/ you get:
`(base) delfireinososusagna@Mac-mini-de-Delfi src % python gui.py
Traceback (most recent call last):
File "/Users/delfireinososusagna/Documents2/ChromaDB-Plugin-for-LM-Studio-main/src/gui.py", line 15, in <module>
from initialize import main as initialize_system
File "/Users/delfireinososusagna/Documents2/ChromaDB-Plugin-for-LM-Studio-main/src/initialize.py", line 4, in <module>
import ctranslate2
File "/Users/delfireinososusagna/anaconda3/lib/python3.11/site-packages/ctranslate2/__init__.py", line 53, in <module>
from ctranslate2 import converters, models, specs
File "/Users/delfireinososusagna/anaconda3/lib/python3.11/site-packages/ctranslate2/converters/__init__.py", line 8, in <module>
from ctranslate2.converters.transformers import TransformersConverter
File "/Users/delfireinososusagna/anaconda3/lib/python3.11/site-packages/ctranslate2/converters/transformers.py", line 14, in <module>
import transformers
File "/Users/delfireinososusagna/anaconda3/lib/python3.11/site-packages/transformers/__init__.py", line 26, in <module>
from . import dependency_versions_check
File "/Users/delfireinososusagna/anaconda3/lib/python3.11/site-packages/transformers/dependency_versions_check.py", line 16, in <module>
from .utils.versions import require_version, require_version_core
File "/Users/delfireinososusagna/anaconda3/lib/python3.11/site-packages/transformers/utils/__init__.py", line 61, in <module>
from .hub import (
File "/Users/delfireinososusagna/anaconda3/lib/python3.11/site-packages/transformers/utils/hub.py", line 94, in <module>
PYTORCH_PRETRAINED_BERT_CACHE = os.getenv("PYTORCH_PRETRAINED_BERT_CACHE", constants.HF_HUB_CACHE)
^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'huggingface_hub.constants' has no attribute 'HF_HUB_CACHE'
(base) delfireinososusagna@Mac-mini-de-Delfi src %
`
So something is wrong above, perhaps after compiling hnswlib I should have done something different
I understand that at the end of the process you should call 'python gui.py' on any terminal prompt, but I can live with that
Run pip list
and show the libraries that are installed in your virtual environment if you don't mind.
`Package Version
accelerate 0.25.0 aiobotocore 2.7.0 aiohttp 3.9.3 aioitertools 0.7.1 aiosignal 1.2.0 alabaster 0.7.12 anaconda-anon-usage 0.4.2 anaconda-catalogs 0.2.0 anaconda-client 1.12.1 anaconda-cloud-auth 0.1.4 anaconda-navigator 2.5.2 anaconda-project 0.11.1 anyio 3.7.1 appdirs 1.4.4 applaunchservices 0.3.0 appnope 0.1.2 appscript 1.1.2 archspec 0.2.1 argon2-cffi 21.3.0 argon2-cffi-bindings 21.2.0 arrow 1.2.3 astroid 2.14.2 astropy 5.3.4 asttokens 2.0.5 async-lru 2.0.4 atomicwrites 1.4.0 attrs 23.1.0 Automat 20.2.0 autopep8 1.6.0 av 10.0.0 Babel 2.11.0 backoff 2.2.1 backports.functools-lru-cache 1.6.4 backports.tempfile 1.0 backports.weakref 1.0.post1 bcrypt 3.2.0 beautifulsoup4 4.12.2 binaryornot 0.4.4 black 23.11.0 bleach 4.1.0 bokeh 3.3.4 boltons 23.0.0 botocore 1.31.64 Bottleneck 1.3.5 Brotli 1.0.9 certifi 2024.2.2 cffi 1.16.0 chardet 4.0.0 charset-normalizer 3.3.2 chromadb 0.3.29 click 8.1.7 clickhouse-connect 0.7.0 cloudpickle 2.2.1 clyent 1.2.2 colorama 0.4.6 colorcet 3.0.1 coloredlogs 15.0.1 comm 0.1.2 conda 24.1.0 conda-build 24.1.1 conda-content-trust 0.2.0 conda_index 0.4.0 conda-libmamba-solver 24.1.0 conda-pack 0.6.0 conda-package-handling 2.2.0 conda_package_streaming 0.9.0 conda-repo-cli 1.0.75 conda-token 0.4.0 conda-verify 3.4.2 constantly 23.10.4 contourpy 1.2.0 cookiecutter 2.5.0 cryptography 41.0.7 cssselect 1.2.0 ctranslate2 3.24.0 cycler 0.11.0 cytoolz 0.12.2 dask 2023.11.0 dataclasses-json 0.6.4 dataclasses-json-speakeasy 0.5.11 datasets 2.12.0 datashader 0.16.0 debugpy 1.6.7 decorator 5.1.1 defusedxml 0.7.1 diff-match-patch 20200713 dill 0.3.6 distributed 2023.11.0 distro 1.8.0 docstring-to-markdown 0.11 docutils 0.18.1 docx2txt 0.8 duckdb 0.9.2 einops 0.7.0 emoji 2.10.1 entrypoints 0.4 et-xmlfile 1.1.0 executing 0.8.3 fastapi 0.85.1 faster-whisper 0.10.0 fastjsonschema 2.16.2 filelock 3.13.1 filetype 1.2.0 flake8 6.0.0 Flask 2.2.5 flatbuffers 23.5.26 fonttools 4.25.0 frozenlist 1.4.0 fsspec 2023.10.0 future 0.18.3 gensim 4.3.0 gmpy2 2.1.2 greenlet 3.0.1 h11 0.14.0 h5py 3.9.0 HeapDict 1.0.1 hnswlib 0.7.0 holoviews 1.18.2 httptools 0.6.1 huggingface-hub 0.20.3 humanfriendly 10.0 hvplot 0.9.2 hyperlink 21.0.0 idna 3.4 imagecodecs 2023.1.23 imageio 2.33.1 imagesize 1.4.1 imbalanced-learn 0.11.0 importlib-metadata 7.0.1 incremental 21.3.0 inflection 0.5.1 iniconfig 1.1.1 InstructorEmbedding 1.0.1 intake 0.6.8 intervaltree 3.1.0 ipykernel 6.28.0 ipython 8.20.0 ipython-genutils 0.2.0 ipywidgets 8.0.4 isort 5.9.3 itemadapter 0.3.0 itemloaders 1.0.4 itsdangerous 2.0.1 jaraco.classes 3.2.1 jedi 0.18.1 jellyfish 1.0.1 Jinja2 3.1.3 jmespath 1.0.1 joblib 1.2.0 json5 0.9.6 jsonpatch 1.33 jsonpath-python 1.0.6 jsonpointer 2.1 jsonschema 4.19.2 jsonschema-specifications 2023.7.1 jupyter 1.0.0 jupyter_client 8.6.0 jupyter-console 6.6.3 jupyter_core 5.5.0 jupyter-events 0.8.0 jupyter-lsp 2.2.0 jupyter_server 2.10.0 jupyter_server_terminals 0.4.4 jupyterlab 4.0.11 jupyterlab-pygments 0.1.2 jupyterlab_server 2.25.1 jupyterlab-widgets 3.0.9 kaleido 0.2.1 keyring 23.13.1 kiwisolver 1.4.4 langchain 0.0.341 langchain-core 0.0.6 langdetect 1.0.9 langsmith 0.0.88 lazy_loader 0.3 lazy-object-proxy 1.6.0 libarchive-c 2.9 libmambapy 1.5.6 linkify-it-py 2.0.0 llvmlite 0.42.0 lmdb 1.4.1 locket 1.0.0 lxml 4.9.3 lz4 4.3.2 Markdown 3.5.1 markdown-it-py 2.2.0 MarkupSafe 2.1.3 marshmallow 3.20.2 matplotlib 3.8.0 matplotlib-inline 0.1.6 mccabe 0.7.0 mdit-py-plugins 0.3.0 mdurl 0.1.0 menuinst 2.0.2 mistune 2.0.4 monotonic 1.6 more-itertools 10.1.0 mpmath 1.3.0 msg-parser 1.2.0 msgpack 1.0.3 multidict 6.0.4 multipledispatch 0.6.0 multiprocess 0.70.14 munkres 1.1.4 mypy-extensions 1.0.0 navigator-updater 0.4.0 nbclient 0.8.0 nbconvert 7.10.0 nbformat 5.9.2 nest-asyncio 1.5.6 networkx 3.1 nltk 3.8.1 notebook 7.0.6 notebook_shim 0.2.3 numba 0.59.0 numexpr 2.8.7 numpy 1.26.3 numpydoc 1.5.0 olefile 0.47 onnxruntime 1.17.0 openai 0.28.0 openpyxl 3.1.2 optimum 1.15.0 overrides 7.7.0 packaging 23.1 pandas 2.0.3 pandocfilters 1.5.0 panel 1.3.8 param 2.0.2 parsel 1.6.0 parso 0.8.3 partd 1.4.1 pathlib 1.0.1 pathspec 0.10.3 patsy 0.5.3 pep8 1.7.1 pexpect 4.8.0 pickleshare 0.7.5 pillow 10.2.0 pip 23.2.1 pkce 1.0.3 pkginfo 1.9.6 platformdirs 3.10.0 plotly 5.9.0 pluggy 1.0.0 ply 3.11 posthog 3.4.0 prometheus-client 0.14.1 prompt-toolkit 3.0.43 Protego 0.1.16 protobuf 4.25.2 psutil 5.9.5 ptyprocess 0.7.0 pulsar-client 3.4.0 pure-eval 0.2.2 py-cpuinfo 9.0.0 pyarrow 14.0.2 pyasn1 0.4.8 pyasn1-modules 0.2.8 PyAudio 0.2.14 pycodestyle 2.10.0 pycosat 0.6.6 pycparser 2.21 pyct 0.5.0 pycurl 7.45.2 pydantic 1.10.12 PyDispatcher 2.0.5 pydocstyle 6.3.0 pyerfa 2.0.0 pyflakes 3.0.1 Pygments 2.15.1 PyJWT 2.4.0 pylint 2.16.2 pylint-venv 2.3.0 pyls-spyder 0.4.0 PyMuPDF 1.23.7 PyMuPDFb 1.23.7 pyobjc-core 9.0 pyobjc-framework-Cocoa 9.0 pyobjc-framework-CoreServices 9.0 pyobjc-framework-FSEvents 9.0 pyodbc 5.0.1 pyOpenSSL 23.2.0 pypandoc 1.12 pyparsing 3.0.9 PyQt5 5.15.10 PyQt5-sip 12.13.0 PyQtWebEngine 5.15.6 PySide6 6.6.1 PySide6-Addons 6.6.1 PySide6-Essentials 6.6.1 PySocks 1.7.1 pytest 7.4.0 python-dateutil 2.8.2 python-docx 1.1.0 python-dotenv 0.21.0 python-iso639 2024.2.7 python-json-logger 2.0.7 python-lsp-black 1.2.1 python-lsp-jsonrpc 1.0.0 python-lsp-server 1.7.2 python-magic 0.4.27 python-slugify 5.0.2 python-snappy 0.6.1 pytoolconfig 1.2.6 pytz 2023.3.post1 pyviz_comms 3.0.0 pywavelets 1.5.0 PyYAML 6.0.1 pyzmq 25.1.2 QDarkStyle 3.0.2 qstylizer 0.2.2 QtAwesome 1.2.2 qtconsole 5.4.2 QtPy 2.4.1 queuelib 1.6.2 rapidfuzz 3.6.1 referencing 0.30.2 regex 2023.10.3 requests 2.31.0 requests-file 1.5.1 requests-toolbelt 1.0.0 responses 0.13.3 rfc3339-validator 0.1.4 rfc3986-validator 0.1.1 rich 13.3.5 rope 1.7.0 rpds-py 0.10.6 Rtree 1.0.1 ruamel.yaml 0.17.21 ruamel-yaml-conda 0.17.21 s3fs 2023.10.0 safetensors 0.4.0 scikit-image 0.22.0 scikit-learn 1.2.2 scipy 1.11.4 Scrapy 2.8.0 seaborn 0.12.2 semver 2.13.0 Send2Trash 1.8.2 sentence-transformers 2.2.2 sentencepiece 0.1.99 service-identity 18.1.0 setuptools 68.0.0 shiboken6 6.6.1 sip 6.7.12 six 1.16.0 smart-open 5.2.1 sniffio 1.3.0 snowballstemmer 2.2.0 sortedcontainers 2.4.0 soupsieve 2.5 Sphinx 5.0.2 sphinxcontrib-applehelp 1.0.2 sphinxcontrib-devhelp 1.0.2 sphinxcontrib-htmlhelp 2.0.0 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 1.0.3 sphinxcontrib-serializinghtml 1.1.5 spyder 5.4.3 spyder-kernels 2.4.4 SQLAlchemy 2.0.25 stack-data 0.2.0 starlette 0.20.4 statsmodels 0.14.0 sympy 1.12 tables 3.9.2 tabulate 0.9.0 tblib 1.7.0 tenacity 8.2.2 termcolor 2.3.0 terminado 0.17.1 text-unidecode 1.3 textdistance 4.2.1 threadpoolctl 2.2.0 three-merge 0.1.1 tifffile 2023.4.12 tinycss2 1.2.1 tldextract 3.2.0 tokenizers 0.15.1 toml 0.10.2 tomlkit 0.11.1 toolz 0.12.0 torch 2.1.2 torchaudio 2.1.2 torchvision 0.16.2 tornado 6.3.3 tqdm 4.65.0 traitlets 5.7.1 transformers 4.36.0 truststore 0.8.0 Twisted 22.10.0 typing_extensions 4.9.0 typing-inspect 0.9.0 tzdata 2023.3 uc-micro-py 1.0.1 ujson 5.4.0 Unidecode 1.2.0 unstructured 0.11.6 unstructured-client 0.18.0 urllib3 2.0.7 uvicorn 0.27.0.post1 uvloop 0.19.0 w3lib 1.21.0 watchdog 3.0.0 watchfiles 0.21.0 wcwidth 0.2.5 webencodings 0.5.1 websocket-client 0.58.0 websockets 12.0 Werkzeug 2.2.3 whatthepatch 1.0.2 wheel 0.38.4 widgetsnbextension 4.0.5 wrapt 1.14.1 wurlitzer 3.0.2 xarray 2023.6.0 xlrd 2.0.1 xlwings 0.29.1 xxhash 2.0.2 xyzservices 2022.9.0 yapf 0.31.0 yarl 1.9.3 zict 3.0.0 zipp 3.17.0 zope.interface 5.4.0 zstandard 0.19.0 (base) delfireinososusagna@Mac-mini-de-Delfi src % `
It seems you have the correct versions of transformers and huggingfacehub...Not sure what's going on, something to do with Conda I imagine. Here's a chat session I had. I'll leave it up for a few days, but other than that it's extremely difficult for me to help troubleshoot since I don't have macos myself...See if this helps and let me know. I might be able to come up with a few more ideas...
https://chat.openai.com/share/3fa84a0a-c9cc-4a7e-9264-27b88d6f6e0b
I've rellied on previously compilation of hnswlib 0.7.0 and I've followed your path without activating Conda
The log is there as output last copia 2.txt]
There are no errors
I the end we found
`Source path: User_Manual/pdf.py
Warning: pdf.py not found in User_Manual folder.
Installation and file copying completed successfully.`
When I run the
(src) (base) delfireinososusagna@Mac-mini-de-Delfi src % **source bin/activate**
(src) (base) delfireinososusagna@Mac-mini-de-Delfi src % **python gui.py**
I have this error:
Traceback (most recent call last): File "/Users/delfireinososusagna/Documents2/ChromaDB-Plugin-for-LM-Studio-main/src/gui.py", line 17, in <module> from gui_tabs import create_tabs File "/Users/delfireinososusagna/Documents2/ChromaDB-Plugin-for-LM-Studio-main/src/gui_tabs.py", line 6, in <module> from gui_tabs_settings import GuiSettingsTab File "/Users/delfireinososusagna/Documents2/ChromaDB-Plugin-for-LM-Studio-main/src/gui_tabs_settings.py", line 3, in <module> from gui_tabs_settings_whisper import TranscriberSettingsTab File "/Users/delfireinososusagna/Documents2/ChromaDB-Plugin-for-LM-Studio-main/src/gui_tabs_settings_whisper.py", line 5, in <module> from voice_recorder_module import VoiceRecorder File "/Users/delfireinososusagna/Documents2/ChromaDB-Plugin-for-LM-Studio-main/src/voice_recorder_module.py", line 11, in <module> from utilities import my_cprint File "/Users/delfireinososusagna/Documents2/ChromaDB-Plugin-for-LM-Studio-main/src/utilities.py", line 8, in <module> import pynvml ModuleNotFoundError: No module named 'pynvml'
(src) (base) delfireinososusagna@Mac-mini-de-Delfi src % pip list Package Version
accelerate 0.25.0 aiohttp 3.9.3 aiosignal 1.3.1 anyio 3.7.1 attrs 23.2.0 av 10.0.0 backoff 2.2.1 beautifulsoup4 4.12.3 certifi 2024.2.2 chardet 5.2.0 charset-normalizer 3.3.2 chromadb 0.3.29 click 8.1.7 clickhouse-connect 0.7.0 coloredlogs 15.0.1 ctranslate2 3.24.0 dataclasses-json 0.6.4 dataclasses-json-speakeasy 0.5.11 datasets 2.17.0 dill 0.3.8 docx2txt 0.8 duckdb 0.9.2 einops 0.7.0 emoji 2.10.1 et-xmlfile 1.1.0 fastapi 0.85.1 faster-whisper 0.10.0 filelock 3.13.1 filetype 1.2.0 flatbuffers 23.5.26 frozenlist 1.4.1 fsspec 2023.10.0 h11 0.14.0 hnswlib 0.8.0 httptools 0.6.1 huggingface-hub 0.20.3 humanfriendly 10.0 idna 3.6 InstructorEmbedding 1.0.1 Jinja2 3.1.3 joblib 1.3.2 jsonpatch 1.33 jsonpath-python 1.0.6 jsonpointer 2.4 langchain 0.0.341 langchain-core 0.0.6 langdetect 1.0.9 langsmith 0.0.90 lxml 5.1.0 lz4 4.3.3 Markdown 3.5.1 MarkupSafe 2.1.5 marshmallow 3.20.2 monotonic 1.6 mpmath 1.3.0 msg-parser 1.2.0 multidict 6.0.5 multiprocess 0.70.16 mypy-extensions 1.0.0 networkx 3.2.1 nltk 3.8.1 numpy 1.26.4 olefile 0.47 onnxruntime 1.17.0 openai 0.28.0 openpyxl 3.1.2 optimum 1.15.0 overrides 7.7.0 packaging 23.2 pandas 2.0.3 pillow 10.2.0 pip 24.0 posthog 3.4.0 protobuf 4.25.2 psutil 5.9.5 pulsar-client 3.4.0 pyarrow 15.0.0 pyarrow-hotfix 0.6 PyAudio 0.2.14 pydantic 1.10.14 PyMuPDF 1.23.7 PyMuPDFb 1.23.7 pypandoc 1.12 PySide6 6.6.1 PySide6-Addons 6.6.1 PySide6-Essentials 6.6.1 python-dateutil 2.8.2 python-docx 1.1.0 python-dotenv 1.0.1 python-iso639 2024.2.7 python-magic 0.4.27 pytz 2024.1 PyYAML 6.0.1 rapidfuzz 3.6.1 regex 2023.12.25 requests 2.31.0 safetensors 0.4.2 scikit-learn 1.4.0 scipy 1.11.4 sentence-transformers 2.2.2 sentencepiece 0.1.99 setuptools 65.5.0 shiboken6 6.6.1 six 1.16.0 sniffio 1.3.0 soupsieve 2.5 SQLAlchemy 2.0.25 starlette 0.20.4 sympy 1.12 tabulate 0.9.0 tenacity 8.2.3 termcolor 2.3.0 threadpoolctl 3.2.0 tokenizers 0.15.1 torch 2.1.2 torchaudio 2.1.2 torchvision 0.16.2 tqdm 4.66.2 transformers 4.36.0 typing_extensions 4.9.0 typing-inspect 0.9.0 tzdata 2023.4 unstructured 0.11.6 unstructured-client 0.18.0 urllib3 2.2.0 uvicorn 0.27.1 uvloop 0.19.0 watchdog 3.0.0 watchfiles 0.21.0 websockets 12.0 wrapt 1.16.0 xlrd 2.0.1 xxhash 3.4.1 yarl 1.9.4 zstandard 0.22.0
Answer by CodefuseDeepSeek running in LmStudio
It seems like the pynvml module is missing from your environment. You can install it by running the following command in your terminal:
`[pip install pynvml]`
After installing the module, try running your program again and see if you still encounter any issues. If not, then the issue should be resolved.
After this I have the program running!
So I'll write an updated procedure, Conda compling of hnswlib 0.7.0 as a requisite and pynvml should be installed by your script
Excellent! Yes, using "pip install pynvml" should work. HOWEVER, on macOs systems you shouldn't need to install pynvml, which is a library solely for displaying nvidia gpu metrics like power usage, etc. I thought I fixed the issue of it being required before the program would work on macos, but I'll have to revisit that I guess..Thanks again dude.
By the way, there should be a file in my User Manual folder named pdf.py
. This file is some source code from Langchain that I modified in order to process PDF files into the database. It's necessary for the program to work properly. My installation procedure should automatically move this file to replace the pdf.py
file in langchain's library.
Your installation log states "Warning: pdf.py not found in User_Manual folder." but also "Installation and file copying completed successfully." so it's not clear whether this was done. Again, this is necessary for the program to correctly process PDF files. My program is specifically geared towards using this modified source code, NOT Langchain's original code. This netted an 80x sped up in loading PDF files.
What I'm saying is...just fyi, you may need to manually move the file yourself. The log states that the directory where it should be moved is /Users/delfireinososusagna/Documents2/ChromaDB-Plugin-for-LM-Studio-main/src/lib/python3.11/site-packages/langchain_coresite-packages/langchain/document_loaders/parsers/pdf.py Try that and test loading a pdf file...
Part of the installation procedure should automatically move that file to a directory where
Possibly. Just to clarify, you're trying to run replace_pdf.py, is that correct?
What's supposed to happen is as follows:
When you pip install requirements.txt it does not install Langchain for Linux or MacOS. This is because I need the watchdog library installed first. Then, when you run replace_pdf.py, it's supposed to install Langchain and use "watchdog" to see where it's installed...then get the path to pdf.py so I can replace it with the pdf.py
in my User Manual folder. The whole purpose I did it this way is because there's no reliable way to determine where site packages are installed on Linux and MacOS since I don't have those systems, and some people were reporting different directory structures anyways even on the same platform...
So just to confirm, you're running replace_pdf.py? If so, it's strange that it's not even detecting my modified pdf.py
..so that's issue #1. And issue #2 is why watchdog isn't detecting the correct path where the original pdf.py is located.
Something changed
I'l run your new package and perhaps all is right. I'l inform you
Target path: /Users/delfireinososusagna/Documents2/ChromaDB-Plugin-for-LM-Studio-main/src/lib/python3.11/site-packages/langchain_coresite-packages/langchain/document_loaders/parsers/pdf.py
Source path: User_Manual/pdf.py Warning: pdf.py not found in User_Manual folder. Installation and file copying completed successfully.
But in this moment any directory /langchain_coresite-packages/ is deployed there
perhaps because there is neither /langchain_coresite-packages-0.0.6.dist-info/
Traceback (most recent call last):
File "/Users/delfireinososusagna/Documents2/ChromaDB-Plugin-for-LM-Studio-main/src/gui.py", line 17, in
this is the error when i try to run python gui.py and there is no way even If I
src) (base) delfireinososusagna@Mac-mini-de-Delfi src % pip install pynvml Collecting pynvml Using cached pynvml-11.5.0-py3-none-any.whl (53 kB) Installing collected packages: pynvml Successfully installed pynvml-11.5.0
so you need to revert to the working packet with the external install
pip install pynvml
and create the missing folder
And I'll try
I understand that all databases will be created in the folder structure bellow /src/ so I will try to install all on a external drive after the first successfull installation
I recently corrected utilities.py twice to correct the pynvml and torch errors.
By the way, correction, if you ever need to install "pynvml" the library is actually called "nvidia-ml-py==12.535.108" It's just referred to as "pynvml" when you use it in a script.
The "pynvml" library on pypi.org is created buy some random guy...the one I'm using is from nvidia.
I'll try to build now with your later code. As soon as I have all working you'll be the first to know
Target path: /Users/delfireinososusagna/Documents2/ChromaDB-Plugin-for-LM-Studio-main/src/lib/python3.11/site-packages/langchain_coresite-packages/langchain/document_loaders/parsers/pdf.py
The /langchain_coresite-packages/ it's not created
But the program launches without errors
Some font family it's not available, I can search it on a font library
font family "Segoe UI Historic" with one that exists to avoid this cost.
doh set to "" -- SystemOnly
The process of movini the pdf.piy file fails I need to install manually.
I'll write a command to move it, because I've written an app in Applescript that compiles the plugin and copies all needed to the destination tree
As the hnswlib 0.8.0 needs to be compiled separately, I'll send you and you can incorporate on the requiremens for the mac installation
Try testing v3.4.3 per our Discord discussion and let me know.
I have followed all installation steps, even the Requirements
The process stops with errors on
I send you the Terminal Log
output last.txt
System: Mac Mini 2 Pro 32 Gb RAM MacOS 14.3
Homebrew and Phyton where installed before the process