Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant import IfxPy #59

Open
edwinhobbs-cx opened this issue Jun 11, 2021 · 3 comments
Open

Cant import IfxPy #59

edwinhobbs-cx opened this issue Jun 11, 2021 · 3 comments

Comments

@edwinhobbs-cx
Copy link

Hello, and thanks for creating all these great tools for using Python with Informix!
I am fairly new at Python, being an old fashion Informix DBA, but I want to learn.
I am running into an issue. I hope you can help me.

Problem: Cannot import IfxPy directly or through IfxPiDbi in Windows 10 64-bit
After installing PyCharm using python 3.8.5 I cannot directly import IfxPy.
Note: I also installed CSDK for Informix 64bit. This is my INFORMIXDIR.

My env
HKEY_CURRENT_USER\Environment
CSDK_HOME REG_SZ C:\Program Files\IBM Informix Client-SDK
INFORMIXDIR REG_SZ C:\Program Files\IBM Informix Client-SDK
INFORMIXSERVER REG_SZ ibm229
LD_LIBRARY_PATH REG_EXPAND_SZ %INFORMIXDIR%\lib;%INFORMIXDIR%\lib\esql;%INFORMIXDIR%\lib\cli
Path REG_EXPAND_SZ %INFORMIXDIR%\bin;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;%PyCharm%;%PyCharm Community Edition%;C:\Program Files (x86)
Google\Cloud SDK\google-cloud-sdk\bin;
PSModulePath REG_EXPAND_SZ %HomeDrive%%HomePath%\Documents\WindowsPowerShell\Modules;C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platfo
rm\PowerShell
PyCharm REG_SZ C:\Program Files\JetBrains\PyCharm 2020.3.5\bin;
PyCharm Community Edition REG_SZ C:\Program Files\JetBrains\PyCharm Community Edition 2020.3.5\bin;

Heres my steps

Created a new project Informix.
Installed wheel, then IfxPy from settings/Project Informix
Both said they were installed successfully

IfxPy 3.0.5
Wheel 0.36.2

Created a new python file IfxPy_connect
Import IfxPy gives error
No module named IfxPy

Import IfxPyDbi works fine.
Dir(IfxPyDbi) shows IfxPy module, but cannot access any of its functions.

I looked in the site packages
C:\Users\pf556315\PycharmProjects\Informix\venv\Lib\site-packages

I see IfxPyDbi.py and an extension IfxPy.cp38-win_amd64.pyd
There is no IfxPy.py file.

Any help is appreciated!

Ed

@edwinhobbs-cx
Copy link
Author

OK got it to work by using python3.7.
Maybe a defect in 3.8?

@zdenop
Copy link

zdenop commented Jun 11, 2021

have a look at #41

@zagrebzagreb
Copy link

Also #35
"Maybe is a 38 thingy. I haven't try 38 yet, 37 is the most recent version I have."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants