1. Ray Veenema
  2. Valentina Database ADK
  3. Вторник, Октябрь 12 2021, 04:41 PM
  4.  Подписаться через email
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
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
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?
Комментарий
There are no comments made yet.
Ray Veenema Ответ принят
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?
Комментарий
There are no comments made yet.
Ray Veenema Ответ принят
Can you tell me how you integrated valentina.so with Python?
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
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.
Комментарий
There are no comments made yet.
Ray Veenema Ответ принят
That solution works.

Thank you so much for your time and assistance.
Комментарий
There are no comments made yet.
  • Страница :
  • 1


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

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories