Resolving PackageNotFoundError: Packages missing in current channels

If you are using Anaconda as your choice of Python distribution, chances are that you have encountered this error message when you try to install a package with conda install command.

There are two ways to fix this issue.

  • Use pip install instead of conda install.
  • Search the package and install it from the available channel.

(1) Use pip install

The first option is easy. You just type pip install and it will install the package. Make sure to upgrade pip with the command below.

Linux

pip install --upgrade pip

Windows

python -m pip install --upgrade pip

(2) Search the package and install it from non-default channel.

Steps

  • Run the search command
anaconda search –t conda <package name>
  • The result will show you the channel that has the package. Choose the channel with an appropriate platform.

  • From the example above, I will choose the conda-forge channel to install requests-oauthlib with the command below.
conda install -c conda-forge requests-oauthlib

Happy days!

Git
How to specify which Node version to use in Github Actions

When you want to specify which Node version to use in your Github Actions, you can use actions/setup-node@v2. The alternative way is to use a node container. When you try to use a publicly available node container like runs-on: node:alpine-xx, the pipeline gets stuck in a queue. runs-on is not …

AWS
Using semantic-release with AWS CodePipeline and CodeBuild

Here is the usual pattern of getting the source from a git repository in AWS CodePipeline. In the pipeline, we use AWS CodeStart to connect to a repo and get the source. Then, we pass it to the other stages, like deploy or publish. For some unknown reasons, CodePipeline downloads …

DBA
mysqldump Error: Unknown table ‘COLUMN_STATISTICS’ in information_schema (1109)

mysqldump 8 enabled a new flag called columm-statistics by default. When you have MySQL client above 8 and try to run mysqldump on older MySQL versions, you will get the error below. mysqldump: Couldn’t execute ‘SELECT COLUMN_NAME, JSON_EXTRACT(HISTOGRAM ‘$”number-of-buckets-specified”‘) FROM information_schema.COLUMN_STATISTICS WHERE SCHEMA_NAME = ‘myschema’ AND TABLE_NAME = ‘craue_config_setting’;’: Unknown …