twardoch/split-markdown4gpt

CLI command doesn't work on Windows

avfirsov opened this issue · 5 comments

Hello. I successfully installed package vie pip install split_markdown4gpt. But command mdsplit4gpt path_to_your_file.md --model gpt-3.5-turbo --limit 4096 --separator "=== SPLIT ===" doesn't work: I get bash: mdsplit4gpt: command not found.
I tried restarting my bash, it doesn't help.
Also, I tried this command:

$ pip show split_markdown4gpt
Name: split-markdown4gpt
Version: 1.0.9
Summary: A Python tool for splitting large Markdown files into smaller sections based on a specified token limit. This is particularly useful for processing large Markdown files with GPT models, as it allows the models to handle the data in manageable chunks.
Home-page: https://github.com/twardoch/split-markdown4gpt
Author: Adam Twardoch
Author-email: adam+github@twardoch.com
License: Apache-2.0
...

So it looks like the package was installed. What can I be doing wrong?

Try

python3 -m split_markdown4gpt path_to_your_file.md --model gpt-3.5-turbo --limit 4096 --separator "=== SPLIT ==="

Thank you for prompt response. I got in bash Python and nothing happens, no new files being created :/

Oh, I've forgotten to install Python. After Python installation, I get new error: C:\Users\FooBar\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\python.exe: No module named split_markdown4gpt

Now install it again with

python3 -m pip install split_markdown4gpt

Note that Python 3.10, 3.11, 3.12 all have their own modules (your need to install separately for each)

Then do

python3 -m split_markdown4gpt ...

Thank you very much, it worked!