Search code examples
pythonpython-3.xgsutil

ipython installation on mac


I have uninstalled Anacond on mac. Now trying to install ipython using pip3. When I try to install ipython, getting a prompt "User for us-central1-python.pkg.dev: ". This asks for user and password. What should I enter here? I use GCP and I have installed gsutil. I'm not sure if this is due to any GCP artifact.

name@blr  ~ % python --version
zsh: command not found: python
name@blr  ~ % python3 --version
Python 3.9.6
name@blr ~ % pip3 install ipython          
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://us-central1-python.pkg.dev/workspace_code/analyticsv2-pypi/simple/
User for us-central1-python.pkg.dev: 


update: I verified ~/.pip/pip.conf, it has an entry as below

name@blr ~ % vim ~/.pip/pip.conf

[global]
extra-index-url = https://us-central1-python.pkg.dev/workspace_code/analyticsv2-pypi/simple/


Solution

  • Error is related to the configuration of your Python package index sources. Specifically, the prompt for a username and password for us-central1-python.pkg.dev suggests that your pip configuration is pointing to a private or custom repository hosted on GCP in addition to the default PyPO3 repo.

    Set index-url or extra-index-url in pip.conf to https://us-central1-python.pkg.dev/workspace_code/analyticsv2-pypi/simple/ or remove them if you are not intending to use a private repo.

    Meanwhile you can bypass the custom repo with the following command:

    pip3 install ipython --index-url https://pypi.org/simple