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

Operation only allowed in C++, Windows 10, python 3.6 #3016

Open
hieuthehungry opened this issue Jun 27, 2019 · 2 comments

Comments

Projects
None yet
3 participants
@hieuthehungry
Copy link

commented Jun 27, 2019

I tried to import a package into my Jupyter Notebook, but is given an error notification saying: Error compiling cython file. Can somebody help me resolve the problem? Thanks!

@david-cortes

This comment has been minimized.

Copy link

commented Jun 27, 2019

That's not nearly enough information to diagnose a problem. Please be more specific and add at a minimum:

  • Which package? Is it a public package from pypi/conda?
  • What's the full error message? (use backticks to display as code within github)
  • What's your setup? (Python version, Cython version, OS, other relevant info)

Also if you are importing a package it should not be compiling anything.

@samaingw

This comment has been minimized.

Copy link
Contributor

commented Jul 5, 2019

So, I'll try here to make a guess work, based on the issue's title.

If I understand you correctly, you have somewhere a cython compilation which is taking place, and you have the Operation only allowed in C++ error.

If so, it is due to the fact the code you're compiling is using new/del statements on cppclass object pointers, without cython being invoked in c++ mode.

Fix: pass the --cplus option to cython.

I do not understand too why you have a cython compilation when importing a package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.