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

does not use python3 when both python2 & 3 are installed

jacob opened this issue · comments

I have python 3.7 installed. I am using a mac. The default installation of python 3 for mac users leaves python 2 installed because python 3 is not backwards compatible: https://stackoverflow.com/questions/5846167/how-to-change-default-python-version

However rma does not look for the python 3 libraries it needs, instead it uses the default ones and fails as follows:

rma --help
Traceback (most recent call last):
  File "/usr/local/bin/rma", line 6, in <module>
    from rma.cli.rma_cli import main
  File "/usr/local/lib/python2.7/site-packages/rma/__init__.py", line 1, in <module>
    from rma.application import RmaApplication
  File "/usr/local/lib/python2.7/site-packages/rma/application.py", line 145
    self.reporter.print(str_res)
                      ^
SyntaxError: invalid syntax

I do not use python regularly as a programming language, so I am unfamiliar with how the python community typically resolves this issue. I am trying to use rma because it provides a unique feature set. It would be helpful if rma either did the right thing in this situation or there was a paragraph in the README explaining how to resolve this.

Make sure you used pip3 to install rma. You may need to do sudo pip uninstall rma, and then sudo pip3 install rma.

ok that resolved the issue, closing this. to be precise, switching from python virtualenv to pyenv for managing multiple python versions resolved the issue.