Code Monkey home page Code Monkey logo

Comments (13)

diogobaeder avatar diogobaeder commented on July 20, 2024

UPDATE: I could install hiredis-py when using a virtualenv created for Python 2.6 (which, by the way, is the default in my Linux installation), but not inside a virtualenv with Python 2.7. Maybe there's something wrong with my machine installations (despite having installed both python2.6-dev and python2.7-dev), but I'm still quite unsure of what's happening. For now, I'll use Python 2.6 for the project, while I can't make hiredis work with Python 2.7 here.

from hiredis-py.

pietern avatar pietern commented on July 20, 2024

Tested this in a Ubuntu 11.04 VM and I'm seeing the same issue. Installing it in a virtual env fails, where installing it in the global env works perfectly fine. Can also confirm that the build process aborts on build_clib. Unfortunately, I'm not too familiar with the build system: getting it to build with distutils was a challenge to begin with. Debugging something like this is not something where I know where to start..

from hiredis-py.

diogobaeder avatar diogobaeder commented on July 20, 2024

Yes, that's exactly the problem I had, too... well, I don't have much experience with C/C++ applications, but I'll try to compile it by hand and see if there's some header library missing or something like this... the strange thing is that with a virtualenv with python 2.6 works...

from hiredis-py.

pietern avatar pietern commented on July 20, 2024

Which makes me believe this is an issue with the distutils that virtualenv bundles, or something similar. You could try moving/copying the install dir for the globally installed version for 2.6 to the dir in the virtual env and see if that works.

from hiredis-py.

diogobaeder avatar diogobaeder commented on July 20, 2024

As with the virtualenv with 2.6 it worked, I'll create virtualenvs for both versions and compare the differences between them, and see if there's something missing for 2.7. I'll give you a feedback later about the results. Thanks!

from hiredis-py.

tailhook avatar tailhook commented on July 20, 2024

Well, it's not something related to python 2.7, but probably related to default python installed or to your distribution. On my Archlinux it works in virtualenv.

from hiredis-py.

aleszoulek avatar aleszoulek commented on July 20, 2024

Just confirming having the same issue on venv Ubuntu Natty (11.04).

from hiredis-py.

kvbik avatar kvbik commented on July 20, 2024

same here

i sense some distutils/setup.py/site.py related stuff (debian tweaks site.py little bit)

just some details about my env:

jakub@web5:/tmp/PU2/src$ wget http://pypi.python.org/packages/source/h/hiredis/hiredis-0.1.0.tar.gz#md5=0030abe2fd3acbecbd0d960d60844142

jakub@web5:/tmp/PU2/src/hiredis-0.1.0$ source ../../bin/activate

(PU2)jakub@web5:/tmp/PU2/src/hiredis-0.1.0$ python setup.py install
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/hiredis
copying hiredis/__init__.py -> build/lib.linux-x86_64-2.7/hiredis
copying hiredis/version.py -> build/lib.linux-x86_64-2.7/hiredis
running build_clib
error: None

(PU2)jakub@web5:/tmp/PU2/src/hiredis-0.1.0$ uname -a
Linux web5.whiskeymedia.com 2.6.38-8-virtual #42-Ubuntu SMP Mon Apr 11 04:06:34 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
(PU2)jakub@web5:/tmp/PU2/src/hiredis-0.1.0$ cat /etc/debian_version
squeeze/sid
(PU2)jakub@web5:/tmp/PU2/src/hiredis-0.1.0$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.04
DISTRIB_CODENAME=natty
DISTRIB_DESCRIPTION="Ubuntu 11.04"
(PU2)jakub@web5:/tmp/PU2/src/hiredis-0.1.0$ python --version
Python 2.7.1+

from hiredis-py.

kvbik avatar kvbik commented on July 20, 2024

i dig through the build_clib execution and find out this failure

(PU2)jakub@web5:/tmp/PU2/src/hiredis-0.1.0$ python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> __import__('sysconfig').get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', 'CCSHARED', 'LDSHARED', 'SO', 'AR', 'ARFLAGS')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/sysconfig.py", line 457, in get_config_vars
    _init_posix(_CONFIG_VARS)
  File "/usr/lib/python2.7/sysconfig.py", line 310, in _init_posix
    raise IOError(msg)
IOError: invalid Python installation: unable to open /tmp/PU2/local/lib/python2.7/config/Makefile (No such file or directory)

do you see the path? /tmp/PU2/local/lib/python2.7/config/Makefile? that is the debian site.py tweak..

from hiredis-py.

kvbik avatar kvbik commented on July 20, 2024

first tweak is obvious, but is on the virtualenv end of the problem:

# this is the path to your virtualenv
jakub@web5:~$ cd /tmp/PU2/

# this is the UGLY HOTFIX
jakub@web5:/tmp/PU2$ ln -s . local

# now it should work
jakub@web5:/tmp/PU2$ source bin/activate
(PU2)jakub@web5:/tmp/PU2$ pip install hiredis

# ....

# there we are
(PU2)jakub@web5:/tmp/PU2$ python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import hiredis
>>> hiredis.__file__
'/tmp/PU2/local/lib/python2.7/site-packages/hiredis/__init__.pyc

i will try to find some solution we can put in the hiredis setup.py file..

from hiredis-py.

bettlebrox avatar bettlebrox commented on July 20, 2024

I had the same issue on ubuntu 11.04. The workaround above worked for me.

from hiredis-py.

chacken avatar chacken commented on July 20, 2024

Interesting bug. kvbik's workaround worked for me.

from hiredis-py.

pietern avatar pietern commented on July 20, 2024

This doesn't seem to be an issue on 13.10 with setuptools 1.4.2, pip 1.4.1, and virtualenv 1.10.1.

I tested this configuration for Python 2.6.9, 2.7.6, 3.2.5, and 3.3.3.

Closing this issue.

from hiredis-py.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.