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 module sercore for mapreduce.pipes #211

Closed
sudheesh001 opened this issue Apr 17, 2016 · 8 comments
Closed

No module sercore for mapreduce.pipes #211

sudheesh001 opened this issue Apr 17, 2016 · 8 comments

Comments

@sudheesh001
Copy link

sudheesh001 commented Apr 17, 2016

>>> import pydoop.mapreduce.pipes as pp
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pydoop-1.2.0-py2.7.egg/pydoop/mapreduce/pipes.py", line 28, in <module>
    from pydoop.utils.serialize import (
  File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pydoop-1.2.0-py2.7.egg/pydoop/utils/serialize.py", line 90, in <module>
    import pydoop.sercore as codec_core
ImportError: No module named sercore

Steps to reproduce

  1. git clone https://github.com/crs4/pydoop
  2. cd pydoop
  3. python setup.py install
  4. python
>>> import pydoop.mapreduce.api as api # works perfectly
>>> import pydoop.mapreduce.pipes as pp # results in error
@elzaggo
Copy link
Contributor

elzaggo commented Apr 18, 2016

Hi.
What happens if you cd to another directory, say /var/tmp, and then try the imports in python again?

--gianluigi

@sudheesh001
Copy link
Author

@elzaggo I still get the same error. Here's the trace

(venv)[21:25:08] sudheeshsinganamalla:tmp $ python
Python 2.7.8 (default, Oct 19 2014, 16:02:00)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.54)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pydoop.mapreduce.api as api
>>> import pydoop.mapreduce.pipes as pp
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/sudheeshsinganamalla/Documents/ComputerVision/pydoop/mapreduce/pipes.py", line 28, in <module>
    from pydoop.utils.serialize import (
  File "/Users/sudheeshsinganamalla/Documents/ComputerVision/pydoop/utils/serialize.py", line 90, in <module>
    import pydoop.sercore as codec_core
ImportError: No module named sercore
>>>

@ilveroluca
Copy link
Member

Try getting out of the pydoop directory before launching the python shell. Python puts the CWD at the start of the PYTHONPATH.

If that doesn't help, maybe you have an older or broken pydoop installation kicking around? Try setting PYTHONPATH to the path where Pydoop is getting installed. Or print out the path of the pydoop module you're loading with pydoop.__file__ from within your python shell, and then make sure it's coherent with your setup. Careful with virtualenv too.

@sudheesh001
Copy link
Author

@ilveroluca I launched the python shell in var/tmp which is denoted as sudheeshsinganamalla:tmp in the way i organized my zsh to display. I ran the above code in a virtual environment venv and have not installed it in the system wide python libraries.

@elzaggo
Copy link
Contributor

elzaggo commented Apr 19, 2016

Ok, what do you have in your sys.path? This the kind of things that happen when either there is a glitch in the installation or something funny in PYTHONPATH.

--gianluigi

@sudheesh001
Copy link
Author

@elzaggo Here it is

>>> import sys
>>> print sys.path
['', '/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-5.4.2-py2.7.egg', '/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg', '/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nonude-1.0-py2.7.egg', '/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/geoplotlib-0.3.0-py2.7.egg', '/Users/sudheeshsinganamalla/Documents/astropy', '/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django_locationtracking-1.0.0-py2.7.egg', '/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/hadoopy-0.6.0-py2.7-macosx-10.10-x86_64.egg', '/Users/sudheeshsinganamalla/Documents/ComputerVision/pydoop/pydoop', '/Library/Python/2.7/site-packages/pip-1.5.4-py2.7.egg', '/usr/local/lib/python2.7/site-packages/setuptools-5.4.2-py2.7.egg', '/usr/local/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg', '/usr/local/lib/python2.7/site-packages/nonude-1.0-py2.7.egg', '/usr/local/lib/python2.7/site-packages/geoplotlib-0.3.0-py2.7.egg', '/usr/local/lib/python2.7/site-packages/django_locationtracking-1.0.0-py2.7.egg', '/usr/local/lib/python2.7/site-packages/hadoopy-0.6.0-py2.7-macosx-10.10-x86_64.egg', '/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/usr/local/Cellar/numpy/1.9.2_1/libexec/nose/lib/python2.7/site-packages', '/Library/Python/2.7/site-packages', '/usr/local/lib/python2.7/site-packages']

@ilveroluca
Copy link
Member

Hi,

the sercore module is generated by the build process. If you've verified that you're not accidentally loading modules from the source directory (where the sercore module will never exist), then maybe you've found a bug in the build process. Try explicitly calling

python setup.py build

before installing and see if that solves your problem. You should be able to see the sercore module under the build directory created by the build process; you can search for it with find:

10:24 [pireddu@slynx pydoop] find . -name 'sercore*'
./build/lib.linux-x86_64-2.7/pydoop/sercore.so

@simleo
Copy link
Member

simleo commented Oct 15, 2018

Closing due to lack of activity. Assuming cause is as stated above by @elzaggo and @ilveroluca.

@simleo simleo closed this as completed Oct 15, 2018
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

4 participants