-
Notifications
You must be signed in to change notification settings - Fork 309
NameError: name 'ensurepip' is not defined #99
Comments
@mpratt14 any suggestions? |
@wolfer649 meanwhile please use https://learn.adafruit.com/thermocouple/python-circuitpython |
This is really bumming me out. However ensurepip seems to be disabled: |
Temporary workaround - install Adafruit_Python_GPIO from the commit before it was broken: |
3 things: Yeah...my bad...I messed up the pull request... There are some small issues left in the SPI methods that I worked on (there was more before that), also going to push that...this time I made sure I tested everything extensively.... (but I'm not testing on python 3 right now) you are using python 3 it seems (which, I'm not sure will run this library well or not) so you don't need to worry about ensurepip. I'll have the positive existence of pip handled when I fix the setup.py |
@ladyada @RyAndrew @wolfer649 should be perfect now |
they've been merged, please try! |
thanks seems to be working |
It works great for Python 2.7 on Rasbian Stretch Full 06-27 w/Pi 3 B.
For Python 3, the only problem is that the print statements in setup.py are not Python 3 compatible.
i.e. no parens.
When I comment them out, the install runs fine with Python 3 and my MAX31855-based software works under Python3 as well.
Well, that's just my platform.
Thanks for the late night fix.
From: ladyada [mailto:notifications@github.com]
Sent: April 2, 2019 12:47 AM
To: adafruit/Adafruit_Python_GPIO <Adafruit_Python_GPIO@noreply.github.com>
Cc: wolfer649 <steve.fowler@rogers.com>; Mention <mention@noreply.github.com>
Subject: Re: [adafruit/Adafruit_Python_GPIO] NameError: name 'ensurepip' is not defined (#99)
they've been merged, please try!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#99 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/Aa5lAora6M5AP4TMxOauvNAS7nSKr5C1ks5vcuDOgaJpZM4cW2rG> .
|
this library was never py3 compat - please use please use https://learn.adafruit.com/thermocouple/python-circuitpython :) |
@ladyada I think you keep linking the wrong thing... @wolfer649 No problem, I'm just glad I was able to fix my own mistakes. I had no idea the incompatibility between the python versions were so extreme! Maybe add that detail to the readme, and then a fully compatible print line to remind the user they should be using python 2.x in setup.py... Edit: It seems newest libFTDI has ok python 3 support, so in the future making this library compatible might not be too difficult... |
im pretty sure im linking to the right thing, its our Blinka-based MAX31855 library, if they follow those steps they'll be good to go :) |
@ladyada Ah...I looked over the part where @wolfer649 mentioned using the MAX31855. @wolfer649 which library exactly did you try to install other than this one? or are you using something completely different to run that device? wrote your own? Is it simply not compatible with python 3 or only the setup.py for that one? I might have misunderstood, but does this library run well on python 3, at least the sections used for the thermocouple? I'm guessing you are using this one, which seems to depend on this library If anyone is trying to use CircuitPython for SPI or I2C in general uses / other devices I would start here: |
Apologies if I've caused a schmozzle here, re: Python 3.
Python 3 is no biggie for me. I was just trying to future-proof my code for Python 3, since Raspbian Stretch seems headed that way
and the default matplotlib install is now Python 3 as well.
(My project doc is in https://github.com/wolfer649/WGOT)
Just to summarize, in case it answers some questions …
I had installed the Adafruit MAX31855 software based on the instructions at the (now, no longer supported) web site …
https://learn.adafruit.com/max31855-thermocouple-python-library/software
Until recently, that had worked OK - for Python 2.7 and Python 3 - then failed recently, as described earlier.
And, as mentioned before, the MAX31855 install problem was caused by the 'ensurepip' statement in the setup.py for Adafruit_Python_GPIO.
As of now the MAX31855 software installation works great for Python 2.7, but with the "print" statement errors for Python 3 in setup.py for Adafruit_Python_GPIO.
My MAX31855-base code works fine with Python 3 now too, though I have to clone Adafruit_Python_GPIO and comment out the "print" statements to get that fully installed.
I will try the CircuitPython approach in the future, assuming it allows me to re-wire the MAX31855 connections to be compatible with the Adafruit 2.8" Capacitive Touch TFT - another topic for another time.
Thanks to all for your help and advice.
From: mpratt14 [mailto:notifications@github.com]
Sent: April 2, 2019 5:51 PM
To: adafruit/Adafruit_Python_GPIO <Adafruit_Python_GPIO@noreply.github.com>
Cc: wolfer649 <steve.fowler@rogers.com>; Mention <mention@noreply.github.com>
Subject: Re: [adafruit/Adafruit_Python_GPIO] NameError: name 'ensurepip' is not defined (#99)
@ladyada <https://github.com/ladyada> Ah...I looked over the part where @wolfer649 <https://github.com/wolfer649> mentioned using the MAX31855.
@wolfer649 <https://github.com/wolfer649> which library exactly did you try to install other than this one? or are you using something completely different to run that device? wrote your own?
There's so many of them that look similar....
Is it simply not compatible with python 3 or only the setup.py for that one?
I might have misunderstood, but does this library run well on python 3, at least the sections used for the thermocouple?
I'm guessing you are using this one, which seems to depend on this library
https://github.com/adafruit/Adafruit_Python_MAX31855
If anyone is trying to use CircuitPython for SPI or I2C in general uses / other devices I would start here:
https://learn.adafruit.com/circuitpython-basics-i2c-and-spi/spi-devices
https://circuitpython.readthedocs.io/en/3.x/shared-bindings/busio/SPI.html
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#99 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/Aa5lAgKN378wTBUnfCPE5GmXxbsIJ10cks5vc9CzgaJpZM4cW2rG> .
|
@wolfer649 Thanks for the full explanation, there's so many things involved I got confused. Looks like it would indeed help you to make the print statements compatible with both so I'll do that right now |
@mpratt14 awesome, thank you thank you!!!! |
hiya thank you for the issue. we're going to be deprecating this library in favor of our python3 Blinka library which has support for almost 200 different drivers, and a wide variety of linux computers as well as ft232h |
"NameError: name 'ensurepip' is not defined" - msg received when running setup.py.
Platform: Raspberry Pi 3 B with fresh Rasbian Stretch 06-27 install.
Adafruit_Python_GPIO was cloned from github.
Line 1 of setup.py is "ensurepip" which fails with the error message above.
If line 1 is commented out, the script seems to run OK for Python 3 and Python 2.7.
(the "python" command on this version of Stretch defaults to Python 2.7)
BTW, this was the root cause of an error installing the Adafruit MAX31855 software.
The text was updated successfully, but these errors were encountered: