Comments (13)
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.
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.
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.
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.
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.
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.
Just confirming having the same issue on venv Ubuntu Natty (11.04).
from hiredis-py.
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.
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.
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.
I had the same issue on ubuntu 11.04. The workaround above worked for me.
from hiredis-py.
Interesting bug. kvbik's workaround worked for me.
from hiredis-py.
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)
- pip install failing for version 2.0.0 python 3.10 HOT 2
- Can't install hiredis HOT 2
- C99 errors with older gcc HOT 4
- PUSH type not distinguishable from ARRAY type in RESP3 HOT 4
- Release for supporting Python 3.10 HOT 9
- Support newest hiredis release 1.1.0
- Source tarballs unavailable on pypi? HOT 5
- Changelog entry missing for 2.1.0
- Support dispatch/manual and tagged releases
- Windows wheels fail to build due to ssize_t redefinition HOT 2
- CI needs to properly account for all buildwheels attempts - at least in some labelled cases HOT 1
- sdsalloc.h doesn't seem to be installed as part of regular hiredis HOT 9
- Support garbage collection in Reader HOT 1
- Tag mismatch for 2.2.3/2.3.0 release HOT 2
- tests/test_asyncio/test_connect.py hangs on Python 3.12
- Release 2.3.0 not available on PyPI HOT 4
- Python 3.12 wheels HOT 2
- Memory leak on hgetall with RESP3 and hiredis HOT 2
- hiredis 2.3.2 probably causes fastapi app crashes HOT 1
- Hiredis cannot be installed on Python 3.13 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hiredis-py.