installation issue
rpk113 opened this issue · 8 comments
installing via easy_install wont look at my local packages set via PYTHONPATH. It keeps trying to download the package which is not allowed from the server I am using..
easy_install-2.7 --prefix='/data/mktlocal/log/LIBRARY' kafka_influxdb-0.9.3
Processing kafka_influxdb-0.9.3
Writing /data/mktlocal/log/PACKAGES/kafka_influxdb-0.9.3/setup.cfg
Running setup.py -q bdist_egg --dist-dir /data/mktlocal/log//PACKAGES/kafka_influxdb-0.9.3/egg-dist-tmp-j5ljyZ
removing '/data/mktlocal/log/LIBRARY/lib/python2.7/site-packages/kafka_influxdb-0.9.3-py2.7.egg' (and everything under it)
creating /data/mktlocal/log/LIBRARY/lib/python2.7/site-packages/kafka_influxdb-0.9.3-py2.7.egg
Extracting kafka_influxdb-0.9.3-py2.7.egg to /data/mktlocal/log/LIBRARY/lib/python2.7/site-packages
kafka-influxdb 0.9.3 is already the active version in easy-install.pth
Installing kafka_influxdb script to /data/mktlocal/log/LIBRARY/bin
Installed /data/mktlocal/log/LIBRARY/lib/python2.7/site-packages/kafka_influxdb-0.9.3-py2.7.egg
Processing dependencies for kafka-influxdb==0.9.3
Searching for ujson
Reading https://pypi.python.org/simple/ujson/
Download error on https://pypi.python.org/simple/ujson/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for 'ujson' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
No local packages or download links found for ujson
error: Could not find suitable distribution for Requirement.parse('ujson')
echo $PYTHONPATH
:/python/Jinja2/2.7.3/common/2.7/lib/python/Jinja2-2.7.3-py2.7.egg/:/python/MarkupSafe/0.23/common/MarkupSafe-0.23-py2.7-linux_x86_64.egg/:/python/matplotlib/1.2.1/exec/matplotlib-1.2.1-py2.6-linux-x86_64.egg/:/python/pandas/0.17.1/common/pandas-0.17.1-py2.7-linux_x86_64.egg/:/python/numpy/1.9.2/exec/numpy-1.9.2-py2.7-linux-x86_64.egg/:/python/six/1.10.0/common/six-1.10.0-py2.7.egg:/python/requests/2.10.0/common/requests-2.10.0-py2.7.egg:/python/bokeh/0.10.0/common/bokeh-0.10.0-py2.7.egg:/python/setuptools/12.4/common/setuptools-12.4-py2.7.egg:/python/pycrypto/2.6.1_qz1/common/pycrypto-2.6.1+qz1-py2.7-linux_x86_64.egg:/python/ecdsa/0.13/common/ecdsa-0.13-py2.7.egg:/python/paramiko/1.15.2/common/paramiko-1.15.2-py2.7.egg:/python/lxml/3.5.0/exec/2.7/lib/python/lxml-3.5.0-py2.7-linux-x86_64.egg:/python/beautifulsoup4/4.4.1/common/beautifulsoup4-4.4.1-py2.7.egg:/python/django-tagging/0.4.5/common/2.7/lib/python/django_tagging-0.4.5-py2.7.egg::/python/urllib3/1.15.1/common/urllib3-1.15.1-py2.7.egg:/python/scandir/1.5/exec/2.7/lib/python/scandir-1.5-py2.7-linux-x86_64.egg:/python/pyparsing/2.2.0/common/2.7/lib/python/pyparsing-2.2.0-py2.7.egg-info:/python/ujson/1.35/exec/ujson-1.35-py2.7-linux_x86_64.egg:/data/mktlocal/log/LIBRARY/lib/python2.7/site-packages
Sorry, don't think I can be of much help here. Personally I don't use easy_install.
Does it work if you copy ujson into /data/mktlocal/log/LIBRARY/lib/python2.7/site-packages/
?
cp /python/ujson/1.35/exec/ujson-1.35-py2.7-linux_x86_64.egg /data/mktlocal/log/LIBRARY/lib/python2.7/site-packages/
Oh, one more thing I just found in the documentation:
Just copy the eggs or source packages you need to a directory on the target machine, then use the -f or --find-links option to specify that directory's location. For example:
easy_install -H None -f somedir SomePackage
will attempt to install SomePackage using only eggs and source packages found in somedir and disallowing all remote access. You should of course make sure you have all of SomePackage's dependencies available in somedir.
So maybe something like this?
easy_install-2.7 -H None -f /python/ujson/1.35/exec/ --prefix='/data/mktlocal/log/LIBRARY' kafka_influxdb-0.9.3
@mre
Thanks for the tips, I ended up moving over to pip. just easier.. but now I get this..
Processing /PACKAGES/kafka_influxdb-0.9.3
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-OIqNqZ-build/setup.py", line 77, in
zip_safe=False)
File "/python/core/2.7.13-build002/.exec/x86-64.rhel.6/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/python/setuptools/12.4/common/setuptools-12.4-py2.7.egg/setuptools/dist.py", line 269, in init
_Distribution.init(self,attrs)
File "/python/core/2.7.13-build002/.exec/x86-64.rhel.6/lib/python2.7/distutils/dist.py", line 287, in init
self.finalize_options()
File "/python/setuptools/12.4/common/setuptools-12.4-py2.7.egg/setuptools/dist.py", line 323, in finalize_options
ep.require(installer=self.fetch_build_egg)
File "/python/setuptools/12.4/common/setuptools-12.4-py2.7.egg/pkg_resources/init.py", line 2327, in require
reqs = self.dist.requires(self.extras)
File "/python/setuptools/12.4/common/setuptools-12.4-py2.7.egg/pkg_resources/init.py", line 2552, in requires
dm = self._dep_map
File "/python/setuptools/12.4/common/setuptools-12.4-py2.7.egg/pkg_resources/init.py", line 2608, in getattr
raise AttributeError(attr)
AttributeError: _dep_map
any ideas?
Just guessing here.
- Check if you have a module named parser in your python path (or a
parser.pyc
file, maybe) - Create a new virtualenv and try again.
- This might also help.
I get access denied to the first link..
https://bitbucket.org/pypa/setuptools/issues/48/attributeerror-_dep_map
can you see it?
Nope, the bitbucket project is private. But the blog post itself might provide some hints.
Quote from the article:
Found a comment that said:
Ah, that means the real AttributeError is happening inside of the @property; the AttributeError being raised is after the fallback. Unfortunately, due to the way Python's attribute handling works, if there's an attribute error raised by a property getter, and the object has a __getattr__, then the real error is discarded and the __getattr__ is called instead.
So whatever error you're getting needs to be tracked down inside the @property;
Stepping through the code I found another error:
*** AttributeError: 'module' object has no attribute '_subx'
Which came from:
> /usr/lib/python2.7/re.py(155)sub()
-> return _compile(pattern, flags).sub(repl, string, count)
(Pdb) pattern
<_sre.SRE_Pattern object at 0xb6afb270>
(Pdb) flags
0
(Pdb) ccc = _compile(pattern, flags)
(Pdb) ccc
<_sre.SRE_Pattern object at 0xb6afb270>
(Pdb) repl
'\\1==\\2\\3'
(Pdb) string
'importlib'
(Pdb) count
0
(Pdb) ccc.sub(repl, string, count)
*** AttributeError: 'module' object has no attribute '_subx'
Something seemed wrong with the regex-lib. After removing the extra regex-lib via:
sudo python2.7 -mpip uninstall regex
I can use ipdb in my code again.
Sorry, don't know much more than that. Maybe somebody else has an idea...
Closing this due to inactivity. Feel free to re-open in case of new findings.