1
votes

I just followed the instructions on the site and installed aerospike (on linux mint). I'm able to import the aerospike python client module from python 2.7 but not from 3.6 (newly installed). I'm thinking that I need to add the directory to my "python path" perhaps??, but having difficulty understanding how this works. I want to be able to run aerospike and matplotlib in 3.6.

3

3 Answers

3
votes

You should use pyenv to allow yourself to have multiple versions of Python locally, each with their own pip repo. This allows you to switch easily between versions (similar to RVM for Ruby, NVM for Node.js).

For example:

pyenv install -l

pyenv shell 2.7.10 && pyenv local 2.7.10 && pyenv global 2.7.10 && pyenv rehash
pip install aerospike

pyenv shell 3.4.3 && pyenv local 3.4.3 && pyenv global 3.4.3 && pyenv rehash
pip install aerospike
3
votes

Also see https://discuss.aerospike.com/t/large-memory-usage-by-python-driver-on-big-batch-insert/3819/4 - an update to python3 client is in the works to address a mem leak issue per the issues link in that post.

1
votes

I figured it out. I just needed to use pip3 instead of pip to install it to correct version of python (though I was only able to get it onto 3.5, not 3.6 for some reason).