How to install pgdb on MacOS Yosemite? - python-2.7

On Mavericks, I downloaded the source code and and built and installed it with Distutils as I explained on Stackoverflow.
I try to reproduce it on Yosemite and I have the following error message:
Exception: pg_config tool is not available.
The command in 'setup.py' that generates the problem is supposed to "Retrieve information about installed version of PostgreSQL."
f = os.popen('pg_config --%s' % s
I used the graphic installer to install PostgreSQL on my computer.

The graphic installer did not work. By using Homebrew to install PostgreSQL, everything worked fine.
brew install postgresql

Related

Cannot install "psycopg2" on Windows 10 with Python 3.8

Yesterday I uninstalled python 3.7 version by mistake. Then I install python again (this time 3.8 version) and again set up my environment. But I could not start my Django project which has Postgres connection. Actually I cannot install "psycopg2" in my environment. I searched for hours and implement every solutions I get from online but it does not work. Let me tell you what I did so far.
First it said to add Postgres in my PATH so I added C:\Program Files\PostgreSQL\12\bin\ in my PATH.
A new problem then arise with a huge ERROR report with 2 vital Error.
ERROR: Failed building wheel for psycopg2
..........................
Running setup.py install for psycopg2 ... error
I try to upgrade wheel but it says,
Requirement already up-to-date
http://initd.org/psycopg/docs/install.html#install-from-source
I learned from this site that psycopg2 requires python2 version. So I installed python 2.7 also.
I reinstalled PostgreSQL but it does not work.
I deleted my virtual environment and create again but it does not work.
Some says they solve this problem by running pip install psycopg2-binary But it does not work for me.
Please help me to get rid of this. I stuck for hours.
When you asked this question, Python 3.8 had been released very recently so there were not any wheels for Python 3.8 yet.
At the time, my suggestion was to install Python 3.7.X and install the binary wheel with:
pip install psycopg2-binary
Since then, binary wheels have been released for Python 3.8, so the above command should work with Python 3.8.X as well.
I wouldn't try to build from source on Windows if it can be avoided.
Finally, you misunderstood the section of the docs about Python 2. You only need Python 2.7 if you are running Python 2. For Python 3, which you should be using for all new projects, it currently supports Python 3.4 to 3.8.
use:
sudo apt install python3-dev libpq-dev
then try doing:
pip3 install psycopg2
Hope it works for you!!
This problem mainly occurs due to this -- " error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/"
Now to install psycopg2, first you need to install visual studio from Microsoft - https://visualstudio.microsoft.com/visual-cpp-build-tools/
now you need to install the c++ desktop development tool with all its default components selected.
After successful visual studio c++ desktop development kit installation, you can now install psycopg2 successfully in your machine.

virtualenvwrapper -- Opencv 3.1.0 installation error

I am trying to install opencv 3.1.0 by the help of following blog(Why? Because I followed the same blog to install opencv in Desktop, but In my Laptop, following issue came)
Here I encountered the following error as --
ujjal#ujjaldas223:~$ source /usr/local/bin/virtualenvwrapper.sh
/home/ujjal/anaconda2/bin/python: No module named virtualenvwrapper
virtualenvwrapper.sh: There was a problem running the initialization hooks.
If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenvwrapper has been installed for
VIRTUALENVWRAPPER_PYTHON=/home/ujjal/anaconda2/bin/python and that PATH is
set properly.
I followed the link, but failed to resolve issue.
Suggest me how to solve this error.
I am using ubuntu 16.04 LTS both in Desktop and laptop.
I just solved it!
The problem was anaconda path appended to python.
Removing anaconda2 completely solved the issue.

How to add theano to anaconda python v2.7 on ubuntu 16.04?

I'm want to install theano into the anaconda package for python v2.7 on ubuntu 16.04. I already installed anaconda to the folder /opt/anaconda. Can some please guide me on how to install Theano package which is accessible by the anaconda packages. I've searched lot on google but not able find a clear solution to the problem.
I was recommended to switch back to 14.04 for theano, because t just stopped working on 16.04, but still I am also looking for a solid working guide.
There are some resources that explain how to set up these http://deeplearning.net/software/theano/install_ubuntu.html
and https://www.jayakumar.org/linux/gtx-1070-on-ubuntu-16-04-with-cuda-8-0-and-theano/

Can't start git in WebStorm after upgrade to MacOS Sierra

After installing Sierra and starting WebStorm for my project, I'm getting an error that it can't find the git executable. I'm given the opportunity to 'fix it', and navigate to the file in usr/bin/git, but it won't run. In my terminal I ran which git and it returns usr/bin/git.
How can I get it started?
Same problem in Mac OS Sierra version 10.12 solved after running xcode installation with following code from terminal:
xcode-select --install
I ended up reinstalling git 2.10.0. The executable switched location to /usr/local/git/bin/git

Fail to install Python 2.7.9 on a Windows google compute engine instance

I fired up a new Windows google compute engine instance. It's running Windows 2008 R2, service pack 1.
I download and try running the Python .msi installer for version 2.7.9, and it fails with this error:
There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor.
I see this error for both the 64-bit and the 32-bit installer.
Has anyone else seen it or know of a work-around?
I reproduced your issue and I found two workarounds:
You can install python 2.7.6 successfully without further action.
If you need python 2.7.9 you can install it deselecting pip from the install menu.
This seems to be related to this answer in another thread although in that case the issue is with version 3.4.
Install python EXCEPT "pip"
Run the python install msi again and select "change"
Select "pip" and install the pip
It would be works...
I think it is a priority problem into the msi package...the package seems to try to install the pip before installing python.exe. So, pip can not be installed...
I'm using Windows 8.1 64-bit. I had 2.7.11 installed and then I tried to install PIP as well via Chocolatey PIP package.
I think my installation had got messed up because I had tried to install Python 3.4 as well as Python 2.
Then I had deleted all the Python 2 and Python 3 files in an attempt to get rid of this.
What worked for me was:
Editing the Environment Variables both, System and User to remove any PYTHONHOME or PYTHONPATH variables
I also deleted the path I had to python2 in the PATH environment variable
Now (as mentioned in Python Issue 22329) after deleting the Environment variables you can go into 'Programs and Features', click on the Python 2.7.11 (64-bit) program and then click 'Repair' - this then worked as I would expect without error.
Now finally I was able to go into 'Programs and Features', click on the Python 2.7.11 (64-bit) program and then click 'Uninstall'.
Edit: I assume this is connected with this PYTHON_HOME answer to a problem with Python 3.4
It seems to be a dependency issue, please try to install "Microsoft Visual C++ 2008 SP1 Redistributable Package (x64)"