Closed jmo2014 closed 4 years ago
Happy to help, but I don't think I have enough information here. What is this cmake_example? And test.py
is not a file in this repo.
test.py is just a file that I want to execute and see how it goes with cpp import:
import cppimport somecode = cppimport.imp("somecode") #This will pause for a moment to compile the module somecode.square(9)
please use the following link. I make a somecode.cpp file and test.py file under test repository.
It looks like you cloned the repo, but didn't install it. Can you move the test.py and somecode.cpp somewhere outside the cloned repo, install with pip install cppimport
and then try again?
I use the command to install, but still didn't work because it tells me that I already installed it, and nothing happened.
Does anyone has the same issue when executing the test.py in tests file?
The console gives me feedback like this:
Traceback (most recent call last): File "/Users/jiaqimo/Downloads/cppimport-stable/cmake_example copy/tests/test.py", line 1, in
import cmake_example as m
ModuleNotFoundError: No module named 'cmake_example'