Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI usage error: No module named md2pdf.__main__ #42

Open
trots opened this issue Aug 25, 2021 · 4 comments
Open

CLI usage error: No module named md2pdf.__main__ #42

trots opened this issue Aug 25, 2021 · 4 comments
Labels

Comments

@trots
Copy link
Contributor

trots commented Aug 25, 2021

I've trying to run md2pdf from CLI

python -m md2pdf README.md README.pdf

but getting this error

No module named md2pdf.__main__; 'md2pdf' is a package and cannot be directly executed

Could you help me, what I do wrong?

@jmaupetit
Copy link
Owner

Hey @trots 👋

You should use md2pdf and not python -m md2pdf to execute the CLI.

@trots
Copy link
Contributor Author

trots commented Aug 25, 2021

Hey @trots

You should use md2pdf and not python -m md2pdf to execute the CLI.

Thanks for your answer. But it doesn't work for me. The output is

"md2pdf" is not recognized as an internal or external command,
operable program or batch file.

I have Python 3.7.4 (Anaconda), Win 7. md2pdf is installed viapip

pip install md2pdf

Python is added to PATH.
I've noticed that in the python Scripts directory is no md2pdf.exe file. There is just a script file with md2pdf name that is not callable. I can call this script only if I run the command below right in the Scripts directory:

C:\Anaconda\Scripts>python md2pdf
Usage: md2pdf [options] INPUT.MD OUTPUT.PDF

@jmaupetit
Copy link
Owner

Argh, I have no idea how to help you running md2pdf on this OS 😞

@Flydroid
Copy link

Hi,
This issue seemed to have reappeard. Running Windows 10, python 3.9..13.
md2pdf install in to the conda envrioment with pip. Installation worked fine.
Neither md2pdf nor python md2pdf seem to find the script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants