jcfp: Negative, Ghost Rider.
Code: Select all
$ PYTHONPATH=/usr/lib/python2.7 python -c 'from test.pystone import pystones'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named pystone
I suspect that may be the case, as well. That being said, I'm not sure that trick did what you hoped it would do:
Code: Select all
PYTHONPATH=/usr/lib/python2.7 python -c 'import sys; print sys.path'
['', '/usr/local/lib/python2.7/dist-packages/pyserial-2.6-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/simplejson-3.3.0-py2.7-linux-x86_64.egg', '/usr/local/lib/python2.7/dist-packages/gdata-2.0.18-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/todoist-0.0.1-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/python_twitter-1.1-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/requests_oauthlib-0.4.0-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/oauthlib-0.6.0-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/gmusicapi-3.1.1_dev-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/appdirs-1.3.0-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/mock-1.0.1-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/oauth2client-1.2-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/proboscis-1.2.6.0-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/validictory-0.9.3-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/httplib2-0.9-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/pip-1.5.6-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/walter-0.1-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/geeknote-0.2a-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/thrift-0.9.1-py2.7-linux-x86_64.egg', '/usr/local/lib/python2.7/dist-packages/markdown2-2.3.0-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/html2text-2014.9.25-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/evernote-1.25.0-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/oauth2-1.5.211-py2.7.egg', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client']
That is it, however. It is completely something in the search path.
Code: Select all
$ python
Python 2.7.3 (default, Feb 27 2014, 19:58:35)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path=['/usr/lib/python2.7']
>>> print sys.path
['/usr/lib/python2.7']
>>> import test.pystone
>>>
That being said I am more confused now, than I was before.
I futzed around with removing every path and re-adding them back in. I had mixed results.
Stranger still...
Code: Select all
python
Python 2.7.3 (default, Feb 27 2014, 19:58:35)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path.sort()
>>> import test.pystone
>>>
So I went through by hand and did this:
Code: Select all
>>> sys.path.reverse()
>>> print sys.path.pop()
/usr/lib/pymodules/python2.7
>>> sys.path.reverse() >>> import test.pystone Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named pystone
Until I got to an empty list...So, I did this:
Code: Select all
>>> print sys.path.pop()
/usr/lib/python2.7
>>> print sys.path
[]
>>> sys.path.append('/usr/lib/python2.7')
>>> print sys.path
['/usr/lib/python2.7']
>>> import test.pystone
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named pystone
Am I taking crazy pills? Sanity check:
Code: Select all
>>> import test.pystone
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named pystone
>>> sys.path=['/usr/lib/python2.7']
>>> import test.pystone
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named pystone
Yep. I'm taking crazy pills. I am really confused. If I try and call test.pystone before zeroing out the sys.path it WON'T find it ever.
I can't do this any more I have a bad headache.
aSystemOverload: You might want to look into installing with the Debian/Ubuntu packages and repos instead of the tarball. Maybe:
https://forums.sabnzbd.org/viewtopic.php?f=16&t=9844 ?
Cheers
m!