You detach me I detach you

I had pip failing on me while trying to install a lot of requirements from within a custum develop command inside a setup.py. It failed on python 3.x (2.x was fine) with the message:

ValueError: underlying buffer has been detached

The solution was to instead of calling pip from inside the code like import pip; pip.main([...]) just call it from the commandline like:

def pip_install(what):
    os.system("pip install " + what)
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.