Error: "zsh: no matches found: apache-beam[gcp]" while installing Apache Beam

145 views Asked by At

I am working on a project and trying to install Apache Beam from the terminal using this command: pip3 install apache-beam[gcp] however I get this error: zsh: no matches found: apache-beam[gcp]

I created a virtual env using these commands:

pip3 install virtualenv
python3 -m virtualenv env
source env/bin/activate 

2

There are 2 answers

1
9bO3av5fw5 On BEST ANSWER

Needs quotes per eg https://cloud.google.com/dataflow/docs/guides/installing-beam-sdk#python

pip install 'apache-beam[gcp]'

or

pip3 install 'apache-beam[gcp]'
0
Mazlum Tosun On

You can also use a requirements.txt file containing your Python packages to be not dependent on your bash type, then install the packages from this file on your virtual env.

To correctly manage the Python versions on your machine, you can install the PyEnv tool.

Go to the root folder of your project and create a virtual env :

python3 -m venv <virtual-environment-name>

python3 -m venv my-env

my-env is the name of the virtual env.

Activate this venv :

source my-env/bin/activate

At the root of your project, create a file called requirements.txt :

apache-beam[gcp]==2.46.0

Run the following command :

pip install -r requirements.txt