Where is pip.conf in my Mac which Python was installed via Homebrew?
If your pip version is 9.0.1, add the following code to your ~/.pip/pip.conf to avoid the warning. [list] format=columns
If your pip version is 9.0.1, add the following code to your ~/.pip/pip.conf to avoid the warning. [list] format=columns
As stated in the documentation, the default locations for Linux are: per-user: $HOME/.config/pip/pip.conf global: /etc/pip.conf
The help message for the install command will include the default value next to the –index-url option. $ pip install -h … -i, –index-url <url> Base URL of Python Package Index (default https://pypi.python.org/simple). … The message may vary slightly depending on your version of pip. If an alternate address is configured, it will appear in … Read more
In your pip.conf, you will also have to add both of the index hosts as trusted, so would look something like this: [global] index-url = http://download.zope.org/simple trusted-host = download.zope.org pypi.org secondary.extra.host extra-index-url= http://pypi.org/simple http://secondary.extra.host/simple In this example, you have a primary index and two extra index urls and all hosts are trusted. If you don’t … Read more
If the goal only is to list all the installed packages, pip list or conda list are the way to go. pip freeze, like conda list –export, is more for generating requirements files for your environment. For example, if you have created a package in your customized environment with certain dependencies, you can do conda … Read more
Try using the –ignore-installed flag: sudo -H pip3 install –ignore-installed PyYAML This works because to upgrade a package, pip first uninstalls the old version, then installs the new version. It is the uninstall step that fails for distutils packages. With the –ignore-installed flag, the uninstall step is skipped and the new version is simply installed … Read more
The easiest way I’ve found to install pip3 (for python3.x packages) on CentOS 7 is: $ sudo yum install python34-setuptools $ sudo easy_install-3.4 pip You’ll need to have the EPEL repository enabled before hand, of course. You should now be able to run commands like the following to install packages for python3.x: $ pip3 install … Read more
Maybe you have installed both python2 and python3. python3 may have been installed later. You may try to use pip3 instead of pip. First, input the command: pip3 -V If you see the version, the pip3 can be used. Then you can input command line to install nltk: pip3 install nltk I got a way … Read more
You can use pip3 using the alias pip by adding alias to your .bashrc file. alias pip=pip3 or by adding a symlink named pip to your $PATH, which points to the pip3 binary. If there is no ~/.bashrc in your home directory on macOS, inputting alias pip=pip3 in your ~/.zprofile file has the same effect.
Instructions telling people to use sudo pip install are inherently wrong. If there is any tutorial out there which says you should use sudo pip then please file a bug against this package. The author is dis-educating the Python community, as time has proven sudo pip to be a broken practice. OSX El Capitan introduced … Read more