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

No modules named _lowess, _stl, _loess #1

Open
garnieje opened this issue Apr 30, 2015 · 4 comments
Open

No modules named _lowess, _stl, _loess #1

garnieje opened this issue Apr 30, 2015 · 4 comments

Comments

@garnieje
Copy link

Hi There,

I have downloaded the pyloess package.
I have run python setup.py build and python setup.py install
When I type import pyloess in the python console, I got ImportError: No module named _lowess. I can not find _stl and _loess as well.
I have a Mac OS X 10.9.3 and Python 2.7.8.
Any ideas where that is coming from?
Many thanks,
Jérôme.

@andreas-h
Copy link
Owner

sorry for not seeing this earlier ...

and sorry for not being able to help. i forked this repo some long-ish time ago, and never really got to work on it ...

@docnick
Copy link

docnick commented Dec 10, 2015

I ran into the same error: ImportError: No module named _lowess because there is a file: pyloess.py in the current directory so that's what python grabs on the import.

However, after renaming that file I ran into a new issue:
Traceback (most recent call last): File "examples.py", line 23, in <module> import pyloess File "/usr/local/lib/python2.7/dist-packages/pyloess/__init__.py", line 15, in <module> import pyloess File "/usr/local/lib/python2.7/dist-packages/pyloess/pyloess.py", line 41, in <module> import _lowess, _stl, _loess ImportError: /usr/local/lib/python2.7/dist-packages/pyloess/_loess.so: undefined symbol: drot_

I just came across this package - looks like they interface with R to call STL

@rorschachhb
Copy link

rorschachhb commented Jul 14, 2016

@garnieje @andreas-h
I think I might know what happened.

This project is named "pyloess", so if you put this project somewhere like "/home/yourname/", and run python console in the same directory, python will first try to import pyloess from your working directory instead of system directory. And there happens to be a "init.py" in "/home/yourname/pyloess",so python will recognise it as a valid python module and try to load it, but python can't find _loess.so in "/home/yourname/pyloss", that's where the ImportError came from.

I simply changed the folder name from "pyloess" to "pyloess-project" and everything is fine now.

I think it would be better to re-arrange the folder and make it look like this:
|-- examples.py
|-- LICENSE.txt
|-- python
----|-- init.py
----|-- pyloess.py
----|-- mpyloess.py
|-- README
|-- setup.py
|-- src
|-- tests

@vhaasteren
Copy link

There are still problems with linking. After applying this patch on Ubuntu, I get: "ImportError: loess.so: undefined symbol: drot". This happens when trying to import pyloess, with my working directory outside of the source tree of course.

On Windows, I get undefined references to the same linpack routines, but now at compile time: "./src/linpack_lite.f:657: undefined reference to 'drot_',"

This among other things. Looks like the setup script needs to be modified to link to the blas/lapack directories when compiling/linking the Fortran code. Sorry, but I do not have the ability to help with that right now. I am going to go with the R package for now.

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

5 participants