How can I install GRPCIO on an Apple M1 Silicon laptop?

This seems to work well, do the following in the terminal export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1 And then install whatever package that you wanted to install, in my case I was trying to install firebase admin and I had to run the following pip install firebase-admin Or just run the below command if you just want … Read more

pip3 installs inside virtual environment with python3.6 failing due to ssl module not available

I followed the below steps for python3.6 installation in ubuntu 14.04 and virtualenv pip installs works fine. Python 3.6 Installation: sudo apt-get install python3-dev libffi-dev libssl-dev wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz tar xvf Python-3.6.0.tgz cd Python-3.6.0 ./configure –enable-optimizations make -j8 sudo make altinstall python3.6 If seeing the following error — zipimport.ZipImportError: can’t decompress data; zlib not available make: … Read more

Is it safe to delete ~/.cache/pip directory

Since pip 20.1b1, which was released on 21 April 2020 and “added pip cache command for inspecting/managing pip’s wheel cache”, you no longer need to. Instead, you can issue this command: pip cache purge The reference guide is here: https://pip.pypa.io/en/stable/reference/pip_cache/ The corresponding pull request is here.

Find default pip index-url

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

Can pip.conf specify two index-url at the same time?

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

Difference between pip freeze and conda list

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

How to upgrade disutils package PyYAML?

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