Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 02-18-2019, 10:28 PM   #1
xiatian
Enthusiast
xiatian began at the beginning.
 
Posts: 26
Karma: 10
Join Date: Oct 2018
Device: kindle
Question How to import system python modules in a recipe?

How can I import system python modules like selenium in a recipe? I tried this but I got an error "No module named selenium". I want to use selenium to work around javascript to get the source page. Is there any way to use it in a recipe?
xiatian is offline   Reply With Quote
Old 02-19-2019, 01:33 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 34,124
Karma: 10261492
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You cannot, calibre comes with it s own python, you cant use system python with it
kovidgoyal is offline   Reply With Quote
Advert
Old 02-19-2019, 02:45 AM   #3
xiatian
Enthusiast
xiatian began at the beginning.
 
Posts: 26
Karma: 10
Join Date: Oct 2018
Device: kindle
Can I install it to calibre's python using development environment?
xiatian is offline   Reply With Quote
Old 02-19-2019, 04:49 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 34,124
Karma: 10261492
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If you are on linux you can use the distro provided calibre which will typically use system python
kovidgoyal is offline   Reply With Quote
Old 02-19-2019, 05:04 AM   #5
xiatian
Enthusiast
xiatian began at the beginning.
 
Posts: 26
Karma: 10
Join Date: Oct 2018
Device: kindle
I'm on linux and I'm using calibre source code as a development environment. So I want to know if I can just put selenium into the source code? Thanks.
xiatian is offline   Reply With Quote
Advert
Old 02-19-2019, 08:45 AM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 34,124
Karma: 10261492
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If you are using calibre source code as described here: https://manual.calibre-ebook.com/develop.html


then you are not using your distro provided calibre. Instead uninstall it and install the calibre package your distro provides, then you will be able to use calibre.
kovidgoyal is offline   Reply With Quote
Reply

Tags
modules, recipe

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Import module not in bundled Python Toxaris Plugins 11 02-01-2016 01:55 AM
Mini Python on mini, dies on import library mokayak Kobo Developer's Corner 5 04-10-2015 11:02 AM
Recipe works when mocked up as Python file, fails when converted to Recipe ode Recipes 7 09-04-2011 04:57 AM
Import ebook conversion in python script erollisi Calibre 1 08-19-2010 09:43 PM
Plugins and optional Python modules pdurrant Plugins 14 03-02-2010 03:28 AM


All times are GMT -4. The time now is 03:23 PM.


MobileRead.com is a privately owned, operated and funded community.