06-02-2018, 01:59 AM
(06-02-2018, 01:00 AM)ps2daddy Wrote:(06-01-2018, 02:25 PM)TheOldPresbyope Wrote:I appreciate it sir I'll give it a go this evening and report back tonight or tomorrow(06-01-2018, 04:45 AM)ps2daddy Wrote:(05-31-2018, 04:38 PM)TheOldPresbyope Wrote:(05-31-2018, 03:55 PM)ps2daddy Wrote: cant install the api
After I type in
sudo pip install gmusicapi
I get the following error
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 353, in run
wb.build(autobuilding=True)
File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 554, in _prepare_file
require_hashes
File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 568, in _get_pages
page = self._get_page(location)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 792, in get_page
"Cache-Control": "max-age=600",
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py", line 501, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 386, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py", line 488, in request
resp = self.send(prep, **send_kwargs)
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py", line 630, in send
history = [resp for resp in gen] if allow_redirects else []
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py", line 190, in resolve_redirects
**adapter_kwargs
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py", line 609, in send
r = adapter.send(request, **kwargs)
File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/adapter.py", line 47, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/adapters.py", line 423, in send
timeout=timeout
File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 643, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/util/retry.py", line 315, in increment
total -= 1
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
Any help is greatly appreciated
Setup
Pi zero W
Allo Miniboss
8gb SDcard
Moode Audio 4.1
@ps2daddy
I haven't tried recently but back in February (when we were at r4.0) building gmusicapi on an RPi0 was known to fail due to OOM (out of memory) problems. You can temporarily set up Linux to swap to a file to get through the gmusicapi build (Tim disables swap in the moOde OS Builder to save disk space). I'm away from my desk and notes, but several other readers of this forum can tell you how.
This probably should be a FAQ.
Regards,
Kent
Thanks Ill see what I can find out
I've started a build on an RPi0W to repro your issue. Twiddling my thumbs while I wait for it to abend so I can try turning swap back on.
UPDATE:
As I expected,
Code:pi@moode:~ $ sudo pip install gmusicapi
...
Running setup.py bdist_wheel for lxml
...
virtual memory exhausted: Cannot allocate memory
...
Failed building wheel for lxml
...
I then set up a swapfile and tried the pip install again.
Code:pi@moode:~ $ sudo /sbin/dphys-swapfile setup
want /var/swap=100MByte, generating swapfile ... of 100MBytes
pi@moode:~ $ sudo /sbin/dphys-swapfile swapon
pi@moode:~ $ sudo pip install gmusicapi
This time I got the same failure and error message you got, I suppose because of the retry. Aha. Google is our friend. Turns out updating the pip setuptools fixes this
Code:pi@moode:~ $ sudo pip install --upgrade setuptools
...responds with info about what's done...
pi@moode:~ $ sudo pip install gmusicapi
Good news, with a 100MB swapfile enabled and with up-to-date setuptools, installing the gmusicapi now proceeds to completion.
NOTE: compiling on a single-cpu RPI0 with swap in use is a very very slow process but it gets the job done.
Regards,
Kent
Now I get these errors
Failed building wheel for lxml
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-nhhHtu/lxml/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-4Z1lbd-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-nhhHtu/lxml/
It also has this
Successfully built gmusicapi mutagen proboscis gpsoauth future httplib2 pycryptodomex
Failed to build lxml
Installing collected packages: validictory, decorator, mutagen, python-dateutil, proboscis, protobuf, rsa, httplib2, pyasn1-modules, oauth2client, funcsigs, pbr, mock, appdirs, pycryptodomex, gpsoauth, beautifulsoup4, lxml, MechanicalSoup, future, gmusicapi
Running setup.py install for lxml ... \Failed building wheel for lxml
Failed building wheel for lxml
Failed building wheel for lxml Failed building wheel for lxerror