Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipenv fails on a RaspberryPi Zero W and Python 2.7.13 #401

Closed
erinxocon opened this issue Jun 8, 2017 · 11 comments

Comments

Projects
None yet
4 participants
@erinxocon
Copy link
Contributor

commented Jun 8, 2017

I've installed pipenv via pipsi. I also installed pew using pipsi, and added the correct stuff to my path. I compiled python from source on the pi zero. This works perfectly fine on other raspberry pi's when I've compiled python from source and installed everything using pipsi. Here is the output I get when I try and initialize a new environment. This fails no matter what combination of commands I use to initialize an environment (pipenv --two, pipenv install, pipenv install --two, pipenv --three, etc.)

> pi@tinypi:~/sonofwi $ pipenv --two
Creating a virtualenv for this project...
Traceback (most recent call last):
  File "/home/pi/.local/bin/pipenv", line 11, in <module>
    sys.exit(cli())
  File "/home/pi/.local/venvs/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/pi/.local/venvs/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/pi/.local/venvs/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 1043, in invoke
    return Command.invoke(self, ctx)
  File "/home/pi/.local/venvs/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/pi/.local/venvs/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/pi/.local/venvs/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/pi/.local/venvs/pipenv/lib/python2.7/site-packages/pipenv/cli.py", line 780, in cli
    ensure_project(three=three, python=python)
  File "/home/pi/.local/venvs/pipenv/lib/python2.7/site-packages/pipenv/cli.py", line 162, in ensure_project
    ensure_virtualenv(three=three, python=python)
  File "/home/pi/.local/venvs/pipenv/lib/python2.7/site-packages/pipenv/cli.py", line 137, in ensure_virtualenv
    do_create_virtualenv(three=three, python=python)
  File "/home/pi/.local/venvs/pipenv/lib/python2.7/site-packages/pipenv/cli.py", line 396, in do_create_virtualenv
    click.echo(crayons.blue(c.out), err=True)
  File "/home/pi/.local/venvs/pipenv/lib/python2.7/site-packages/pipenv/vendor/delegator.py", line 91, in out
    self.__out = self._pexpect_out
  File "/home/pi/.local/venvs/pipenv/lib/python2.7/site-packages/pipenv/vendor/delegator.py", line 79, in _pexpect_out
    result += self.subprocess.read()
  File "/home/pi/.local/venvs/pipenv/lib/python2.7/site-packages/pipenv/vendor/pexpect/spawnbase.py", line 413, in read
    self.expect(self.delimiter)
  File "/home/pi/.local/venvs/pipenv/lib/python2.7/site-packages/pipenv/vendor/pexpect/spawnbase.py", line 321, in expect
    timeout, searchwindowsize, async)
  File "/home/pi/.local/venvs/pipenv/lib/python2.7/site-packages/pipenv/vendor/pexpect/spawnbase.py", line 345, in expect_list
    return exp.expect_loop(timeout)
  File "/home/pi/.local/venvs/pipenv/lib/python2.7/site-packages/pipenv/vendor/pexpect/expect.py", line 107, in expect_loop
    return self.timeout(e)
  File "/home/pi/.local/venvs/pipenv/lib/python2.7/site-packages/pipenv/vendor/pexpect/expect.py", line 70, in timeout
    raise TIMEOUT(msg)
pexpect.exceptions.TIMEOUT: <pexpect.popen_spawn.PopenSpawn object at 0xb616d9d0>
searcher: searcher_re:
    0: EOF
<pexpect.popen_spawn.PopenSpawn object at 0xb616d9d0>
searcher: searcher_re:
    0: EOF
@erinxocon

This comment has been minimized.

Copy link
Contributor Author

commented Jun 8, 2017

This is related to issue #65 probably because virtualenv is rather slow on the pi zero, it takes longer than 30 seconds to initialize the environment.

@kenneth-reitz

This comment has been minimized.

Copy link
Contributor

commented Jun 8, 2017

try activating the virtualenv first, then running pipenv

@erinxocon

This comment has been minimized.

Copy link
Contributor Author

commented Jun 8, 2017

It's weird, the virtualenv is sort of present but it gets deleted pretty soon after the command fails. I was navigating the directory when my shell threw an error that the folder didn't exist anymore.

@kenneth-reitz

This comment has been minimized.

Copy link
Contributor

commented Jun 8, 2017

create your own!

@erinxocon

This comment has been minimized.

Copy link
Contributor Author

commented Jun 8, 2017

Just created the virtualenv manually....it took 51.72 seconds on the pi zero.

@erinxocon

This comment has been minimized.

Copy link
Contributor Author

commented Jun 8, 2017

Manually creating and activating the virtualenv seems to work. I'm waiting for it to finish installing the dependencies from the pipfile.lock, it's taking a while because there are some c extensions to compile.

@erinxocon

This comment has been minimized.

Copy link
Contributor Author

commented Jun 8, 2017

@kennethreitz was there ever a syntax introduced into the cli that allowed you to specify your own timeout? I know it was talked about in #65 but I don't believe it was implemented. Is there a reason for not allowing a custom timeout?

pi@tinypi:~/.local/share/virtualenvs $ /usr/bin/time -f %E virtualenv foo
Using real prefix '/usr/local'
New python executable in /home/pi/.local/share/virtualenvs/foo/bin/python2.7
Also creating executable in /home/pi/.local/share/virtualenvs/foo/bin/python
Installing setuptools, pip, wheel...done.
0:56.06
@nateprewitt

This comment has been minimized.

Copy link
Member

commented Jun 12, 2017

I think this is wrapped up in #403. Thanks again @erinxocon.

@erinxocon

This comment has been minimized.

Copy link
Contributor Author

commented Jun 13, 2017

@nateprewitt any timeframe for pushing this out into a release? I can install it directly using pipsi by directing it at this git repos master branch for now!

@nateprewitt

This comment has been minimized.

Copy link
Member

commented Jun 13, 2017

@erinxocon I'll try to get a release out this afternoon or tomorrow morning. There's a couple more things I'd like to get resolved before we push to pypi.

@rdpoor

This comment has been minimized.

Copy link

commented May 17, 2018

I stumbled here after asking observing this issue on stack overflow. In case someone else lands here for the same reason, the timeout can be extended like this:

pi@raspberry:~/testdir $ export PIPENV_TIMEOUT=500
pi@raspberry:~/testdir $ pipenv install requests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.