I am trying to execute the following command on Windows 7 using powershell
pip install psycopg2
And I get the error message:
Error: Microsoft Visual C ++ 14.0 required (cannot find vcvarsall.bat). The command "C: \ Users \ Piyush \ AppData \ Local \ Programs \ Python \ Python35 \ python.exe -c" imports setuptools, tokenize; file = 'C: \ Users \ Piyush \ AppData \ Local \ Temp \ pip-build-qe38dwoj \ psycopg2 \ setup.py'; exec (compilation (getattr (tokenize, 'open', open) ( file ). Read (). Replace ('\ r \ n', '\ n'), file , 'exec')) "install -record C: \ Users \ Piyush \ AppData \ Local \ Temp \ pip-7bjug79j-record \ install- record.txt --single-version-external-managed -compile "failed with error code 1 in C: \ Users \ Piyush \ AppData \ Local \ Temp \ pip-build-qe38dwoj \ psycopg2
To install Intu Visuall C ++, you need to install Visual Studio. Except for installing Visual Studio 2013. Are there any others that I can install Psycopg2 for Python 3.5 ??
I ran into a similar problem on Windows. I had to install the compiled version and then easy_install it.
You can find the compiled version of psycopg2 here: http://www.lfd.uci.edu/~gohlke/pythonlibs/
And then do easy_install C: /locaiton/of/download.exe
What am I doing to install it on my windows machine.
Try it. It worked for me
I visited http://www.lfd.uci.edu/~gohlke/pythonlibs/ and downloaded psycopg2-2.6.1-cp35- none-win32.whl and copied it to C: \
I later activated my Virualenv by running this C: \ mydjango \ django19 \ Scripts \ activ on cmd, which led to this (django19) C: / "> and executed the following pip command, pip install psycopg2-2.6.1-cp35-none -win32.whl , and the installation was successful.
Note. Run pip install psycopg2 ....... whl when you are in the current folder with the file psycopg2-2.6.1-cp35-none-win32.whl via cmd
For Linux / Mac, you must first install:
sudo apt-get install python3-dev
and then install psycopg2:
For me, this worked on a server manufactured by DigitalOcean Linux 16.04
Let me know if someone got it right!
Source: https://habr.com/ru/post/1213742/More articles:manually activate active form validation before submitting - yii2Linq query to return filtered data - c #Google maps do not show suddenly in Android - javapython sqlite3 unexpected termination - pythonLINQ to return null if the array is empty - c #Subclassing stringstream gives "0x401bad ABC" instead of "Foo ABC" - c ++UUID string validation - javaCan I inherit from the OCaml class selected at runtime? - ocamlHow to make the application look the same on all devices? - androidEncrypt and decrypt values ββwith AES 256 - c #All Articles