Forum > Packages and Libraries
Python for Lazarus and pip
superc:
Hello,
I'm tried to run demo of Python for Lazarus and all fine to go; in the project directory must reside python.dll and python.zip and msvcr100.dll and the interpreter accept command as REPL style. Now i want to use an external librarys and I want to understand if it is possible to use Python for Lazarus with downloaded libraries (with pip or not).
Thanks in advance.
Thaddy:
pip's are not a problem: that is a dependency on Python, not Freepascal. ( Of course they need to be called from python, not freepascal).
superc:
--- Quote from: Thaddy on December 20, 2022, 04:04:34 pm ---pip's are not a problem: that is a dependency on Python, not Freepascal. ( Of course they need to be called from python, not freepascal).
--- End quote ---
For explain me well, I have installed on my Windows os a standard installation of python 3.10' and setted on path, on my Lazarus program I settet and python3.dll ecc... ecc.. Component Python for Lazarus use local directory dll; is it possible in this condition to download libraries for python and use them in the program programmed in Lazarus?
AlexTP:
1. Add needed dirs to Python's sys.path.(in module 'sys'). You can do it in the REPL demo.
2. Just do 'import modulename' in the REPL.
superc:
--- Quote from: AlexTP on December 20, 2022, 04:12:23 pm ---1. Add needed dirs to Python's sys.path.(in module 'sys'). You can do it in the REPL demo.
2. Just do 'import modulename' in the REPL.
--- End quote ---
I want use mathplotlib to my project and i added from python console of test program a path of library: I downloaded library matplotlib with command:
"pip install matplotlib --target=c:\pl --no-user"
when launch from command console "import matplotlib.pyplot as plt" i receive an error like the photo; How can I fix it (if possible)?
Thanks in advance.
Navigation
[0] Message Index
[#] Next page