Downloading PostgreSQL Mac Download Error - sql

could you please advise me of a solution you may know for downloading PostgreSQL. I am trying to install 9.6.5 version, but also tried the 10.0, same error.
I am using an installation option for Mac operating system OS Sierra from website: https://www.openscg.com/bigsql/postgresql/installers.jsp/
I am getting an error:
Have tried to run the instruction sudo easy_install pip in the command line and it installs the pip file successfully. However I am still unable to install the PostgreSQL.
Please could you advise what the issue may be?
I have also installed Homebrew (it did not help).
I do already have anaconda and Python installed, as well as latest versions of R and RStudio.

I have now found a solution to the above problem (on Mac). Execute the following command in your terminal:
sudo easy_install-2.6 pip
If that does not work execute:
sudo easy_install-2.7 pip
This allows the PostgreSQL to be downloaded correctly.

I followed the instructions suggesting using easy_install-2.7 but still got an error very similar to that from the OP. I had to specifically install pip 9.0.0 with
sudo easy_install-2.7 pip=9.0.0
after which the PostgreSQL install worked.
The default pip is now v10, so it's probably a string compare issue in the installer.

Here is the solution that worked for me on Mac High Sierra 10.13.4:
Clear out the brew cache $ rm -rf ~/Library/Caches/Homebrew
Clear out the site-packages $ sudo rm -rf /usr/local/lib/python2.7/site-packages
Reinstall Python $ brew reinstall python This pulls down python-3.5.6.high_sierra and put it in /usr/local/bin/python3
But which python still shows /usr/bin/python
The solution is to run $ brew install python#2 which pulls down python#2-2.7.14_3.high_sierra
Now which python shows the correct path /usr/local/bin/python which is also where all your pip stuff is installed, so now pip will work.
Ensure the latest version of pip is installed with $ sudo pip install --upgrade pip

Related

Python3.10 source venv has changed

I went to do some python leetcode on a personal repo and after I upgraded my Kubuntu to 22.04 I realized the current venv wasn't working.
I had figured I would need to recreate the venv.
Installed python3.10-venv but I cant source and activate it.
In fact venv/bin/activate doesn't exist anymore.
The folder only contains three files
python python3 python3.10
I had tried but no dice
source venv/bin/python3.10
So naturally source venv/bin/activate doesn't work. Ideas?
I've installed Ubuntu 22.0.4 and I've had the same problem as yours and I solved that problem in this way.
install venv:
sudo apt-get update
sudo apt-get install python3-virtualenv
Create venv:
virtualenv --python=/usr/bin/python3.10 (VENV-NAME)
python3.10 -m venv (VENV-NAME)
source (VENV-NAME)/bin/activate
check & update pip:
pip list
and update pip for example(in my pc):
(/home/amin/Desktop/prog/Django/moein/coffeinrider.com/Project/A/(VENV-NAME)/bin/python3.10 -m pip install --upgrade pip)
When trying to create a virtual env using venv for Python, a version of Python that is already installed system-wide must be used, but a version of the venv library from the system must also be used. These are two pre-requisites for setting up a virtual environment.
WARNING: I did this in a hurry because I needed it but please be warned: this may break your system Python with a result that applications that rely on it may break.
The problem I had, matching symptoms given here, seems to be that when trying to create a venv using Python 3.10.8, the venv module for Python 3.8.10 was being used.
So, given Python 3.8 and Python 3.10 are already installed using apt, first of all I uninstalled these packages:
sudo apt purge python3-venv python3.8-venv
sudo apt autoremove
Then I linked python3 to point to Python 3.10:
cd /usr/bin
sudo rm python3
sudo ln python3.10 python3
Then I installed the venv for Python3.10:
sudo apt install python3.10-venv
This now means creating a virtual environment for Python 3.8 doesn't work (because Python3.8 venv has just been removed). I'm not sure if there is a means to have them both working, and I haven't yet tried to just install python3.8-venv again and try them both, as I need my 3.10 environment working quickly, right now ;-). But it seems possible there has been some conflict introduced when following the usual upgrade route within Ubuntu 20.
However, venv for Python 3.10 should now work as expected:
$ python3 -m venv .venv
$ source .venv/bin/activate
(.venv) $ python -V
Python 3.10.8
(.venv) $ pip install --upgrade pip
...
(.venv) $ pip list
Package Version
---------- -------
pip 22.3
setuptools 63.2.0
It has been updated to source venv/local/bin/activate

opencv-python compiled fail in apple m1 chip

I installed Tensorflow-macos and try to install opencv-python
but always fail in this message
ERROR: Command errored out with exit status 1: /Users/sean/Documents/sysvenv/tf24v/bin/python3 /Users/sean/Documents/sysvenv/tf24v/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/gy/jzs3xnwd1z3203d75y_31nxc0000gn/T/pip-build-env-en64krht/overlay --no-warn-script-location -v --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel scikit-build cmake pip 'numpy==1.13.3; python_version=='"'"'3.6'"'"'' 'numpy==1.14.5; python_version=='"'"'3.7'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"'' 'numpy==1.19.3; python_version>='"'"'3.9'"'"'' Check the logs for full command output.
it lookalike the bumpy version problem.
But In Tensorflow-macos it it 1.8.5 and python is 3.8
Does anynoe have the same problem?
thanks
You might want to look at these suggestions:
opencv issues with M1 MAC - OpenCV imshow doesnot work
conda install opencv
I was successful in installing Python 3.9.1 for Apple Silicon and then running conda install opencv. However, the slow time to compute a few functions for the first time might suggest some components are still being translated via Rosetta. Regardless, while I did not test performance the functions I needed seemed to work.
after searching the web I have successfully installed OpenCV on my Mac M1.
Probably you don't have brew installed, so here's how you should install it:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install wget
brew install miniforge
brew install cmake, you will need cmake for building OpenCV code
Then just follow this blog: https://sayak.dev/install-opencv-m1/#Install-conda
OR, here is the YouTube video which explains the second step: https://youtu.be/x_kAkabk-5o
P.S. If mdfind cv2.cpython returning an empty string then try to delete the build folder and compile opencv again. Otherwise, you have done everything correctly.

Install TensorFlow addons

I have a venv with the following details:
python 3.6
TensorFlow 2.0.0
I tried to install tensorflow-addons using the following:
pip install -q --no-deps tensorflow-addons~=0.6
But then I keep receiving the following error:
Could not find a version that satisfies the requirement tensorflow-addons~=0.6 (from versions: )
No matching distribution found for tensorflow-addons~=0.6
You are using pip version 18.0, however version 19.3.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
I also tried other versions of tensorflow-addons, e. g., 0.4.0, 0.5.0, ..., but it did not work out.
I came across this problem two times and each time I had to solve the problem with a different solution.
1. Solution:
Upgrade pip/pip3 by using the following command.
python3 -m pip install --upgrade pip
Select appropriate version of the tensorflow-addons using the
following link
https://github.com/tensorflow/addons#python-op-compatibility-matrix
Install using the following command
pip install tensorflow-addons==version
2. Solution:
go to https://pypi.org/project/tensorflow-addons/#history
click on appropriate version
click on "Download files" on menu to the left
click on a .whl file that matches your system
requirements/specifications
go to the directory where you download the .whl file and run the
following
pip install tensorflow_addons-name.whl
The problem appears to have been related to installing on Windows platforms in the earlier versions of tensorflow-addons. As of time of updating this comment this issue should disappear completely.
In fact the developers state it has been solved, as it is shown here:
FYI stable release for windows is out. pip install tensorflow-addons
https://github.com/tensorflow/addons/issues/173#issuecomment-573106184
At your command prompt, simply specify the version you want to install.
For me, my python version is 3.7.4 and Tensorflow version is 2.2.0
Therefore, the tensorflow-addons version that matches my python and tensorflow version is 0.10.0
pip install tensorflow-addons==0.10.0

How to download it without pip2

I tried to download the cuckoo on windows, While I got the error 'pip2 install -U cuckoo'.
The default version of pip on my windows system is for python3.
I tried to download python27, and went to the folder, try to pip install. I still failed
It is a little trick.
First, you do need to download the python27 and go to the python27 directory.
Then, you need to download pip2 (https://bootstrap.pypa.io/2.6/get-pip.py), use this command: curl https://bootstrap.pypa.io/2.6/get-pip.py -o get-pip.py
Then python.exe get-pip.py
Now, it still does not work if you just type pip2 install ..
You should use python.exe -m pip install -U cuckoo. (download package under the version of this directory).
After you download the WSL for ubuntu 16.04. You will meet an error the next time you reboot your PC. It is like registerDistribution error. You just need to uninstall all anti-virus software. For me, it is the McAfee. After you uninstall it, reboot your pc. You will find it works normally.
The reference is https://www.youtube.com/watch?v=nLGJHgv6uWA.

PIP install pandas not working

I am trying to install pandas with .whl file in a work computer but I get " cannot fetch URL" error. I have up to date version of PIP installed.How can I get this to work.I'm using Python 3.5.Any help will be appreciated.
I just used the following which was quite simple. First open a console then cd to where you've downloaded your file like some-package.whl and use
pip install some-package.whl
python -m pip install some-package.whl also works if pip is not found in PATH
Note: if pip.exe is not recognized, you may find it in the "Scripts" directory from where python has been installed. If pip is not installed, this page can help:
How do I install pip on Windows?
Note: for clarification
If you copy the *.whl file to your local drive (ex. C:\some-dir\some-file.whl) use the following command line parameters --
pip install C:/some-dir/some-file.whl
I guess since you are on a work computer
try this
sudo pip --proxy=http://username:password#proxyURL:portNumber install yolk
for example:
sudo pip --proxy=http://202.194.64.89:8000 install elasticsearch
202.194.64.89:8000 is my PROXY,