no module named pgoapi.exceptions (already pip install -r requirements.txt)
i get this error a
Traceback (most recent call last): File "pokecli.py", line 38, in
from pgoapi.exceptions import NotLoggedInException, ServerSideRequestThrottlingException, ServerBusyOrOfflineException ImportError: No module named pgoapi.exceptions
and pip install -r requirements.txt
Command "/root/PokemonGo-Bot/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-b56kJV/xxhash/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-44CCiK-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/PokemonGo-Bot/include/site/python2.7/xxhash" failed with error code 1 in /tmp/pip-build-b56kJV/xxhash/
things have changed. You gotta rm -rf pgoapi and do the pip install again.
Can you please elaborate.
Thank you for the thumb up. I encourage you to read what is pip and how pip works generally.
In this particular case, pip install -r requirements.txt will install all listed package versions to the exact specified version. Most of them work just fine as pip should behave, as they are managed packages of the pypi. The exception here is the pgoapi package, listed on line 3. It is not a pypi package. It is a github repository. Pip handle it badly. In occasions you have to remove the whole repository cloned by pip (rm -rf pgoapi) and do pip install again, i.e. pip install -r requirements.txt
This is a great opportunity to learn python!
---- above was original post ----
Sorry @prestonbrown if I jumped to conclusion to soon. I had quite a lot development packages setup on my mac and by just removing and reinstalling pgoapi worked on my laptop. This issue turned out to likely be more that.
I understand python. And thank you for a response. However, I do not think that this is the problem. If you could take a second to read this thread that I have been on, it would be very much appreciated.
https://github.com/PokemonGoF/PokemonGo-Bot/issues/2660
I get this issue even after doing a fresh build: docker-compose build --no-cache ; so no recycling git checkouts.
I have run into the very same error.
At first, my git install of requirements.txt failed in regard to the pgoapi with telling me:
Cloning https://github.com/keyphact/pgoapi.git (to 9c070a789029792a75be34aed408906ee3e3653f) to ./src/pgoapi Could not find a tag or branch '9c070a789029792a75be34aed408906ee3e3653f', assuming commit.
Then the requirements.txt got changed, but nevertheless failed, now with
Cloning https://github.com/keyphact/pgoapi.git (to 249d3be7fbbdabc7f9adea17cbc899d6549e47a2) to ./src/pgoapi Could not find a tag or branch '249d3be7fbbdabc7f9adea17cbc899d6549e47a2', assuming commit.
Then I deleted the respective folder's content and cloned the content of 'https://github.com/keyphact/pgoapi.git' manually into it.
I nevertheless get:
File "pokecli.py", line 38, in
from pgoapi.exceptions import NotLoggedInException, ServerSideRequestThrottlingException, ServerBusyOrOfflineException ImportError: No module named pgoapi.exceptions
issue close guys :)im just missing python.h and i install again with :
sudo apt-get update; Sudo apt-get install python-dev -y
I use homebrew on a Mac (for python installs) which does install python-dev capabilities, doesn't it?
Hi ! I have the same Problem with windows ..
` Failed building wheel for xxhash
Running setup.py clean for xxhash
Failed to build xxhash
Installing collected packages: xxhash
Running setup.py install for xxhash ... error
Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\logins~1\\appdata\\local\\temp\\pip-build-y80spg\\xxhash\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\logins~1\appdata\local\temp\pip-rvbaji-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'xxhash' extension
error: Le fichier spécifié est introuvable
----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\logins~1\\appdata\\local\\temp\\pip-build-y80spg\\xxhash\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\logins~1\appdata\local\temp\pip-rvbaji-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\logins~1\appdata\local\temp\pip-build-y80spg\xxhash\`
Con you help me please ?
I have been looking for 2 hours :(
install Microsoft Visual C++ Compiler for Python 2.7
https://www.microsoft.com/en-us/download/confirmation.aspx?id=44266
same problem here on mac osx
Let's put it in a nutshell:
Mac OS X doesn't have apt-get. There is a package manager called Homebrew that may be used instead. If used, instead of 'apt-get' you have to use the command 'brew'.
After updating Homebrew with 'brew update' (as recommended), I tried to install the Python-Dev package with 'brew install python-dev -y' (following earlier recommendations).
But what I got was the following:
Error: No available formula with the name "python-dev" ==> Searching for similarly named formulae... Error: No similarly named formulae found. ==> Searching taps... Error: No formulae found in taps.
I was told elsewhere that homebrew installations of python would bring -dev capabilities by default. Although that might be wrong, I don't know how to rename the python-dev package to get it brew-installed on a Mac. Any ideas?
In #2843 @BobbyWibowo recommende to reinstall the requirements.txt. ("Try pip2 install -r requirements.txt --upgrade in your bot root.")
I know that my first pgoapi-pip install is/was somehow faulty, as shown in my comment here 9 hours ago. So I also tried as Bobby recommended and got to my surprise
Obtaining pgoapi from git+https://github.com/keyphact/pgoapi.git@249d3be7fbbdabc7f9adea17cbc899d6549e47a2#egg=pgoapi (from -r requirements.txt (line 3)) Skipping because already up-to-date. … Installing collected packages: pgoapi Running setup.py develop for pgoapi Successfully installed pgoapi-1.1.6
Then I tried to start again and got nevertheless:
Traceback (most recent call last): File "pokecli.py", line 38, in
from pgoapi.exceptions import NotLoggedInException, ServerSideRequestThrottlingException, ServerBusyOrOfflineException ImportError: No module named pgoapi.exceptions
Still unclear to me, how to proceed
@Casual-User Did you make sure to append --upgrade command? If that doesn't work, do pip2 uninstall pgoapi (may actually not work tho) then do pip2 install -r requirements.txt --upgrade again.
Got the same issue when I upgraded my python (from 2.7.3 to 2.7.12). If you are getting the same issue after upgrading python, you will have to upgrade pip and virtualenv as well before running pip install.
Hi Bobby, sorry, I edited the comment above to inform about your recommendations. Yes, I appended the --upgrade command and was so confused that the single module I wanted to upgrade was skipped by the system for already being there. maybe I have to delete it manually before and give it a second try (although I did that yesterday with not much success). Thx, help is much appriciated!
Same issue, like @zbyte64 using Docker. Tried to rm all images/containers but error still here.
Attaching to pokemongobot_bot-user1
bot-user_1 | Traceback (most recent call last):
bot-user_1 | File "pokecli.py", line 38, in <module>
bot-user_1 | from pgoapi.exceptions import NotLoggedInException, ServerSideRequestThrottlingException, ServerBusyOrOfflineException
bot-user_1 | ImportError: No module named pgoapi.exceptions
pokemongobot_bot-user1 exited with code 1
Same exact issue - I have tried absolute everything here
For Windows try this https://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi Then pip install -r requirements.txt --upgrade again