Syntax "import"

This is the place for queries that don't fit in any of the other categories.

Syntax "import"

Postby artidermi » Wed Oct 16, 2013 8:30 am

In C:\Essentia\src\python\essentia folder I have the file which contains "import _essentia" on the first line.

I run: import essentia
I get error: ImportError: No module named _essentia

My PYTHONPATH is: C:\Essentia\src\python. I have tried C:\Essentia\src\python\essentia as well.

Why do I get that error?
What do I need to do to fix it?

Last edited by Mekire on Wed Oct 16, 2013 8:48 am, edited 1 time in total.
Reason: First post lock
Posts: 1
Joined: Wed Oct 16, 2013 8:19 am

Re: Syntax "import"

Postby Mekire » Wed Oct 16, 2013 8:45 am

Couple questions:
What version of python are you using? Python 3 demands absolute imports within packages so you would instead need something like:
Code: Select all
for . import _essentia

Is there actually a file called _essentia in this folder C:\Essentia\src\python\essentia or is _essentia a function/class/variable within another module?


I was assuming this was something you wrote yourself. Found it though and am going to see if I can get it working. Will update.

Edit 2:
I managed to get it installed on linux. It was a pain, but eventually I managed to sudo apt-get my way to victory.
On windows however, according to their install page:
Essentia does compile and run correctly on Windows, however there is no Visual Studio project readily available, so you will have to setup one yourself and compile the dependencies too. We will be working on Windows installer in the near future.
I'm however ignorant in such areas, so hopefully someone else can help you.
New Users, Read This
  • Use code tags when posting code.
  • Include any errors with your post (in code tags).
  • Describe your problem; not your chosen solution.
  • Make examples the minimum length to demonstrate your issue.
User avatar
Posts: 1711
Joined: Thu Feb 07, 2013 11:33 pm
Location: Tucson, Arizona

Return to General Coding Help

Who is online

Users browsing this forum: Bing [Bot] and 6 guests