Jump to content
Sign in to follow this  
superc

Python package in Python4Delphi

Recommended Posts

Hello,


I want use with Python4Delphi the Matplotlib Package; I use miniconda for install all packet with Python 3.10.8 and package numpy, matplotlib for run a example program in VisualStudioCode and works fine.

I Download embeddable version of Python 3.10.8 and copy *.dll and python310.zip in example project Demo01; if I try to run 'import numpy' I receive an error like "no module named 'numpy'";

What is the correct way to display packages in Python4Delphi?

 

Thanks in advance.

Share this post


Link to post

P4D works fine with miniconda distributions.  Read FindingPython · pyscripter/python4delphi Wiki (github.com) for details.

1 hour ago, superc said:

I Download embeddable version of Python 3.10.8 and copy *.dll and python310.zip

There is no need to do that.  If on the other hand you want to deploy python with your application, have a look at this project Embarcadero/PythonEnviroments: Components to simplify the deployment for Python environments for Delphi applications using Python4Delphi. (github.com)

 

Edited by pyscripter

Share this post


Link to post
2 hours ago, pyscripter said:

P4D works fine with miniconda distributions.  Read FindingPython · pyscripter/python4delphi Wiki (github.com) for details.

There is no need to do that.  If on the other hand you want to deploy python with your application, have a look at this project Embarcadero/PythonEnviroments: Components to simplify the deployment for Python environments for Delphi applications using Python4Delphi. (github.com)

 

Thank you, I setted my test program as 'unregistered version' and inserted  "MaskFPUExceptions(True);" statement on BeforeLoad of PythonEngine; when I'm try to import numpy I receive this error:

 

"Project Demo01.exe raised exception class EPyValueError with message 'ValueError: failed to parse CPython sys.version: '3.10.8 | packaged by conda-forge | (main, Nov 24 2022, 14:07:00) [MSC v.1916 64 bit (AMD64)]''."

 

PythonEnviroments seems a very interesting project, on near future I will definitely use it.

 

 

 

 

 

Share this post


Link to post

Works all well: Error of previous post it was provocated from an error in conda. Great product Python4Delphi!!!!!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×