Skip to content Skip to sidebar Skip to footer

Installation Failed: Pipenv Install Google-ads (typeerror: Expected String Or Bytes-like Object)

pipenv install google-ads produces an error: ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. This is likely caused b

Solution 1:

It took me a while to figure that out, but it seems to be a problem of pipenv under Python 3.9 (or 3.9.1) in conjunction with the google-ads Module.

My solution:

  1. downgrading to Python 3.8.6 (For me as rookie it was a struggle, just in case you are interested in that: Switching Python version (3.9 → 3.8) installed by Homebrew)
  2. Upgrading pip inside pipenv

I did this like that:

pipenv shell
pip install --upgrade pipexit

Then it finally worked:

% pipenv install google-ads
Installing google-ads...
Adding google-ads to Pipfile's [packages]...
✔ Installation Succeeded 
Pipfile.lock not found, creating...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
✔ Success! 
Updated Pipfile.lock (aba984)!
Installing dependencies from Pipfile.lock (aba984)...
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/000:00:00To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.

Hurray!

Solution 2:

you may want to provide more information to make people answer your question easier, and there are some of example and suggestion shown below.

  1. The statement "This is likely caused by a bug in google-ads. Report this to its maintainers." is raised by pipenv. It means "please do not report the issue to pipenv development team".

  2. Don't rush to claim that you have found a bug: this is a suggestion from "How To Ask Questions The Smart Way" by Eric Steven Raymond. You may check the link for more details about why. Thus, I will suggest you to investigate your operation first instead of contacting with Google Ads.

  3. It seems that you are running the command on a mac/OSX. Besides, it seems that your pipenv is installed by brew. If both of the statements are right, then it is very likely that you are mixing your system-wise pip and local-installed pipenv (by brew). This is a very frequent mistake raised by people who are not familiar with how python package management works.

    1. Thus, the first suggestion to find a solution, is to elaborate the python package management related information on your system (mac/OSX) as much as possible. For example, the output message of python --version, which python, which pip, and which pipenv is usually help.

    2. If you want to use brew to manage packages for you, make sure every step you used to install pipenv and your target package does not mix your system-wise python environment and your local(managed by brew or a python virtual environment) when trying to figure out the issue and finding a solution. For example, make sure you are starting your operation from a "clean" and just-re-spawned terminal. If you want to use brew, make sure you are controlling everything via brew. It will be a bad idea to activate a customized python virtual environment (e.g. conda environment) and then using brew.

    3. I expect people could not provide you other more practical solution suggestions until more information is provided. Good luck.

Post a Comment for "Installation Failed: Pipenv Install Google-ads (typeerror: Expected String Or Bytes-like Object)"