1. Ray Veenema
  2. Valentina Database ADK
  3. Dienstag, Oktober 12 2021, 04:41 PM
  4.  Abonnieren via E-Mail
Python question.

I am porting my Xojo app to Python and downloaded the Python ADK.

For the life of me I am unable to add "valentina.so" to PyCharm. I tried various possible solutions, all to no avail.

I am assuming you have tested the ADK in Python as well.

How did you include the valentina.so library? such that the below works :

import valentina
Kommentar
There are no comments made yet.
Ray Veenema Akzeptierte Antwort
That solution works.

Thank you so much for your time and assistance.
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
Hello Ray,

Yes, I've just checked it with PyCharm.

Currently, on macOS valentina.so is linked to python 3.7 which is expected to be at the following location:
/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/Python

At first, Valentina extension should be placed in site-packages folder.

To know this location you can execute the following command in the Terminal.app (one of the listed folders is site-packages):
python3 -m site

Create the site-packages folder if it doesn't exist and copy valentina.so to it.

In the terminal, go to /Users/Shared/Paradigma Software/VPython_x64_11/Examples and try to run an example:
python3 valentina_connect_to_local.py

If nothing is printed - the file is executed successfully.
Now you can create a new PyCharm project and use Python 3.7 interpreter as a base.
Kommentar
There are no comments made yet.
Ray Veenema Akzeptierte Antwort
Can you tell me how you integrated valentina.so with Python?
Kommentar
There are no comments made yet.
Ray Veenema Akzeptierte Antwort
Sorry should have added that info. :D

I am using MacOS Maverick
PyCharm Professional 2020.2

The statement in my main.py

import valentina

shows an error in the editor for an unresolved reference.
So basically valentina.so is not loaded. Now the question is: How can I manually add valentina.so as an extension or package?
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
Hello Ray,

What OS is used?
Does it work without the IDE?
So the library is not visible to interpreter when running in PyCharm? What error message?
Kommentar
There are no comments made yet.
  • Seite :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.