Quantcast
Channel: JetBrains Developer Community : Thread List - IntelliJ IDEA Users
Viewing all articles
Browse latest Browse all 5661

Python: Importing an .so file

$
0
0

Hey all -

 

I'm at the tail end of my IntelliJ trial. It works pretty well for both Python and Javascript, but I'm running into an issue with a legacy project.

 

A barebones replication of my issue can would be with the following project structure:

/myProject/myExtension.so

/myProject/main.py

 

myExtension.so is compiled c with Python.h (see http://docs.python.org/2/extending/extending.html)

 

Main.py:

import myExtension
print dir(myExtension)

 

I am able to run main.py via the command-line and IntelliJ (Shift+F10). My issue is that the line 'import myExtension' is marked with the error 'no module named myExtension'. I've tried invalidating caches and restarting (out of desperation). Is there any way I can get Intellij to recognize this c extension module?

 

Thanks!


Viewing all articles
Browse latest Browse all 5661

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>