gamenet / redis-memory-analyzer

Redis memory profiler to find the RAM bottlenecks throw scaning key space in real time and aggregate RAM usage statistic by patterns.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't install

shaharmor opened this issue · comments

Hi,

Trying to install on ubuntu 14.04:

Downloading/unpacking rma
  Downloading rma-0.1.5.tar.gz
  Running setup.py (path:/tmp/pip_build_root/rma/setup.py) egg_info for package rma
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip_build_root/rma/setup.py", line 47
        setup(**sdict, install_requires=['redis', 'tabulate', 'tqdm', 'msgpack-python'])
                     ^
    SyntaxError: invalid syntax
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip_build_root/rma/setup.py", line 47

    setup(**sdict, install_requires=['redis', 'tabulate', 'tqdm', 'msgpack-python'])

                 ^

SyntaxError: invalid syntax

----------------------------------------

Could you provide your pip and python version?

# python -V
Python 3.4.3
# pip3 -V
pip 1.5.4 from /usr/lib/python3/dist-packages (python 3.4)

It also happens when i manually clone the repo

This is invalid syntax on any Python version before Python 3.5; you can't put **kwargs keyword argument expansion in front of other keyword arguments. Swap the two:

setup(install_requires=['redis', 'tabulate', 'tqdm', 'msgpack-python'], **sdict)

Python 3.5 allows this as PEP 448 added support for an arbitrary number of expansions to be applied.

@mjpieters tnx for help! @shaharmor could you try with 0.1.6 ?

Now it requests for the msgpack module (Which isn't listed as a requirement).

After installing msgpack-python manually it asked for tqdm (Also not listed..)
Then it asked for tabulate...

and only then it finished successfully.

Can't you make it that it will automatically install it?

@mjpieters could i ask you help again? Now in setup args install_requires listed all requred components - 'redis', 'tabulate', 'tqdm', 'msgpack-python'. Also i see it in rma.egg-info requires.txt. But they do not install. Why?

@shaharmor i move all **kwargs as args. please test it with 0.1.7.

The install_requires looks correct to me but take into account only tools like easy_install and pip will go and fetch those requirements. If you run python setup.py install then you'll need to install the requirements manually.

Hrm, I can confirm the package still doesn't install with pip either.

Ah, you do from rma import __version__ and that then loads rma/__init__.py, which starts loading everything else, including from rma.application import RmaApplication which then imports from rma.scanner import Scanner and scanner.py has import msgpack.

Don't import your package in setup.py.

You could look at What is the correct way to share package version with setup.py and the package? for an alternative method of sharing the version between setup.py and the package.