Install pip on window 10 pc - pip

I am having trouble to install pip on new PC.
I was thinking i may need admin account, so i ran as admin mode.
However, it doesn't help..
I am not sure what can be cause of issue.
I run
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
And, it copied get-pip.py file on my pc
And i run
py get-pip.py
However, it doesn't do anything.
it shows like
C:\user\myaccount>py get-pip.py
C:\user\myaccount>
it was showing like this
I am not sure what i missed..
If I type py --version
version was Python 3.10.5.
And I am using windows 10

Run it in command prompt with administrator, worked for me.

Related

Completely Unable to Run pip on Windows 10

I have installed Python 3.7.4 on Windows 10. The scripts folder is empty. I have all paths added to environment variable PATH. Python is working on running scripts. PIP is not yet recognized and even using python get-pip.py execution is not working.
I have read all possible fixes online but it does not help.
Anyone who can assist? Any help will be much appreciated.
C:\Program Files\Python37> python get-pip.py
Add the following directory to your path.
C:\Program Files\Python37\Scripts
Then, try to download pip again. If this not working, download the get-pip.py manually and install it through the CMD as an Admin.
Here is a website: https://bootstrap.pypa.io/get-pip.py

Python 3.6 USZIPCODE Install

I'm brand new to Python. I've been using Python through Anaconda. I'm running Python 3.6.5. Right now, I'm trying to install a package called USZIPCODE from https://pypi.org/project/zipcodes/. I downloaded the zip file from this site in to my downloads folder. I then tried to use $ pip install uszipcode from the CMD prompt. This doesn't work. "Invalid Syntax" is returned. I've looked at videos on how to use pip to install other packages but they have not been able to solve my problem. The picture below should give some insight in to the issue. Any pointers on how I can install this package into python? Thank you! enter image description here
2 years too late to help bbranham, but for other Anaconda Python beginners having trouble using pip install, use the "Anaconda Powershell Prompt". For instance, on Windows 7:
Hit the windows key and type "Anaconda Powershell Prompt" and select in the search bar to open the Anaconda Powershell cmd prompt.
If you are using different environments make sure to activate your environment with conda activate yourenvname
pip install uszipcode should work out then (to download and install the uszipcode package to your active anaconda environment).

Google Assistant on RPI3 with Android Things

I tried to follow the documentation and got stuck in the point
Open a terminal and follow the instructions to configure a new Python virtual environment and install the `google-assistant-library.
The link in this point redirects to a general page (Introduction to the Google Assistant Library) rather than the instructions.
I think it misses the explanation what it means to open the terminal and exact steps to be followed.
Is the link really correct?
Maybe I need help in using the console correctly, but I am not getting it from that poor documentation.
I can connect to RP with Serial to USB cable and Putty. But simply I do not know what that point 11 and onwards mean...
Any idea?
Thank you
It looks like the links in the Assistant SDK docs were modified, but it should be pointing to this page:
sudo apt-get update
sudo apt-get install python3-dev python3-venv # Use python3.4-venv if the package cannot be found.
python3 -m venv env
env/bin/python -m pip install --upgrade pip setuptools
source env/bin/activate
python -m pip install --upgrade google-auth-oauthlib[tool]
google-oauthlib-tool --scope https://www.googleapis.com/auth/assistant-sdk-prototype \
--save --headless --client-secrets /path/to/client_secret_client-id.json
This will save the credentials at /path/to/.config/google-oauthlib-tool/credentials.json, which you can then copy into your project in order to authenticate the Google Assistant.
As Nick and proppy noted, one step is to obtain authorization code to be used in later steps. Unfortunately the documentation skipped few very important steps and it can lead to confusion. Sadly Google did not simplify the process of integrating the Assistant in the same development environment and hope they will integrate this clumsy process to Android Studio as with other services
If you are developing under Windows you need to:
use a Linux environment and follow the steps in console of that Linux PC (not in the Android Things console of the RP!). Or install Python in Windows. I used the Raspbian in my RP3 to do the Linux version of the procedure...
install Python environment first in the Linux PC console
sudo apt-get update
sudo apt-get install python3-dev python3-venv
python3 -m venv env
env/bin/python -m pip install --upgrade pip setuptools
source env/bin/activate
in this Python environment install google-auth-oauthlib that will generate the credential file
python -m pip install --upgrade google-auth-oauthlib[tool]
change the directory to place you saved the downloaded json file from step before step 11 in the documenatation. e.g.
cd /home/pi/Downloads/
run the google auth tool with the path to your downloaded json file (including its long name, replace idxxx with your id)
google-oauthlib-tool --client-secrets /home/pi/Downloads/client_secret_client-idxxx.json --scope https://www.googleapis.com/auth/assistant-sdk-prototype --save --headless
there will be a link generated in the console. You have to insert the link into browser . You will be prompted in browser to let the tool to use your account and the you will receive an authentication code. Enter this code to the prompt back in the console.
find the generated authenticated authorization code file in the folder prompted in the console and continue in the original documentation steps

How do I uninstall Amazon Elastic Beanstalk Command Line Interface?

I recently ran the following command to install the Amazon Elastic Beanstalk Command Line Interface (EB CLI). I would now like to remove it from my Windows 10 machine.
C:\Users\Cale>pip install --upgrade --user awsebcli
What is the best command to run to ensure that its fully removed from my machine?
I was able to uninstall using the following command:
C:\Users\Cale>pip uninstall awsebcli
I was uncertain how to do the uninstall since I specified --user in the original install command. This stackoverflow article helped me understand that the --user option would not matter during the uninstall process.
How to uninstall a package installed with pip install --user
For me, the awsebcli is not present in the pip list command that references the $PATH. I get this error:
Skipping awsebcli as it is not installed.
Apparently, it's on the pip executable(s) in this location (Windows, PowerShell format):
$env:userprofile\.ebcli-virtual-env\Scripts\
The uninstall command worked properly using one of those executables.
After that, it it seems that deleting the .ebcli-virtual-env will remove it fully from the machine: How do I remove/delete a virtualenv? (disclaimer: I'm not a pythonista :) )

Can't install psycopg2

I'm trying to install psycopg2 so I can use PostgreSQL in Python and Django. I have run into multiple errors in the last few hours trying to install it, and can't seem to solve the latest one. When I run:
setup.py install
on the psycopg2 in the command console it attempts to install it, but then gives an error when trying to execute link.exe in the Visual Studio 8 folder.
This doesn't make sense to me, considering I got that executable to work when I launch it from Windows Explorer, and from the command console. I even made an environment variable for it. However, it keeps giving:
"error: command C:\Program Files(x86)\Microsoft Visual Studio 9.0\VC\BIN\link.exe" failed with exit status 1120
In case anyone goes down this rabbit hole also, make sure your pip is up-to-date:
$ pip install -U pip
$ pip install psycopg2-binary
See: http://initd.org/psycopg/docs/install.html.
That's 3 hours of my life I won't get back.
Turns out this 3 and a half hour process I've been going through was unecessary. an exe installer of psycopg2 can be downloaded from here
Had the same problem.
Image of the error message
first run
sudo apt install libpq-dev python3-dev
then
pip3 install psycopg2
Go to https://pypi.org/project/psycopg2.
In release history select the version you want to download: there will be a table with files and compatible versions of Python.
Download the binary file that matches your system configuration.
For example, for Python 3.6 on Windows 10 (64-bit) download psycopg2-2.8.6-cp36-cp36m-win_amd64.whl.

Resources