I want to speed up my program so i'm trying to setup pypy + psycopg2cffi. This program opens a xml, parses it and then insert some data in a database. I'm using currently python3, postgresql and psycopg2 but this approaches is really slow. So i want to try run my program with pypy + psycopg2cffi. I have python 3 and pypy, and i want to install psycopg2cffi so i ran this command:
pip install psycopg2cffi psycopg2cffi-compat
But psycopg2cffi was only installed on python because when i try to import psycopg2cffi on pypy this is the error i get:
ImportError: No module named psycopg2cffi
So i think i need to install pip first but i can figure out how to do this.
How can i install it on pypy? Thank you.
./usr/bin/pypy -m ensurepip
i get this errorensurepip is disabled in Debian/Ubuntu for the system python. Python modules For the system python are usually handled by dpkg and apt-get. apt-get install pypy-<module name> Install the python-pip package to use pip itself. Using pip together with the system python might have unexpected results for any system installed module, so use it on your own risk, or make sure to only use it in virtual environments.
@ArminRigovirtualenv -p pypy3 pypy3-env
. (Note that an up-to-datevirtualenv
running on CPython2 is perfectly capable of creating pypy3 environments.)pip: /usr/local/bin/pip /usr/local/bin/pip2.7 /home/p/Desktop/pypy-env/bin/pip /home/p/Desktop/pypy-env/bin/pip2.7 /home/anaconda3/bin/pip
and even with pip i can't install psycopg2cffi on pypy why?