[Chicago] Python 3.5 in Ubuntu???

Nick Timkovich prometheus235 at gmail.com
Thu Jan 21 22:38:37 EST 2016


Pyenv 'erry day <https://github.com/yyuu/pyenv-installer>

1. Install pyenv

curl -L
> https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer
> | bash


2. Put hooks in your .bashrc file (and reload it)

echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bashrc
> echo 'eval "$(pyenv init -)"' >> ~/.bashrc
> echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
> source ~/.bashrc


3. Install your preferred version

pyenv install --list
> pyenv install 3.5.0


4. Make it global for your user (if preferred)

pyenv global 3.5.0


5. You want to do a project that needs Python 2.7?

cd myprj
> pyenv install 2.7.11
> pyenv local 2.7.11


Now if you're inside myprj/, "python", "pip", etc. will all launch 2.7.11.

Caveats: You'll need the necessary libraries to build Python from source.
zlib, openssl, and various others need to be apt-gotten

On Thu, Jan 21, 2016 at 8:00 PM, kirby urner <kirby.urner at gmail.com> wrote:

>
>
> On Thu, Jan 21, 2016 at 5:17 PM, Lewit, Douglas <d-lewit at neiu.edu> wrote:
>
>> Hi Kirby,
>>
>> Thanks for the reply.  Where do you teach?  Yeah, I can start Python 3.5
>> in Terminal, not a problem, but I can't launch *idle3.5*--even though
>> the command is there in /usr/bin.  I have a feeling this is more of an OS
>> problem than a Python problem.  I don't know all the details, but I'm sure
>> eventually the people in charge of all those great Ubuntu repositories will
>> address the issue, but not necessarily for Ubuntu 15.04, maybe for some
>> future version of the OS.
>>
>>
> Hi Doug --
>
> I'm just coming on-board here:  https://pdxcodeguild.com/team/  (<guild
> />).  They just added that bio blurb like yesterday.
>
> I also teach at saisoft.net based in Irvine, California.
>
> However my full time glorious Python job for the last few years has been
> with the mother ship:  O'Reilly Media (in the guise of oreillyschool.com),
> parent company to so much we treasure (e.g. Safari On-Line).
>
> They're getting out of the school business though (at least for now, in
> that form).
>
> A very dicey sandbox in which to play, the school business.  So much is
> changing so fast.
>
>
>
>> Also, through some painful trial and error I found out that you better be
>> careful when you change Python versions in Ubuntu.  DO NOT remove the older
>> versions!  The system needs them for various tasks.  Fortunately I was able
>> to fix that problem with three lines of code in xterm.
>>
>
> That same advice goes for Windows, where such as Hewlett-Packard have
> embedded Python in their "distro" (vendors modify Windows to some extent).
> Worried consumers would call in wondering of this "python" might be a virus
> (urban legend).
>
> Older Pythons or older versions of anything may Be The For a Reason. [tm]
>
> You're aware I think that IDLE in particular depends on a non-Python
> process running:  the Tk widgets come from a resource written in tcl
> ("tickle") that exports bindings for other languages.
>
> The module tkinter is the inter-operability module i.e. is basically the
> driver for Tk.  Guido wrote it when he got a little funding from DARPA that
> time (which agency continues to pour money into Python in various ways,
> e.g. $3 mil to Continuum Analytics).
>
>
> https://www.continuum.io/blog/news/continuum-analytics-receives-3m-darpa-xdata-funding
> (source of that Anaconda distro I mentioned)
>
> You probably know that already, about IDLE (a pun on Eric Idle of the
> Monty Python troupe).
>
> I tell my students that Python remains reasonably small because it does
> not embed any specific widgets solution, but in the Standard Library we
> have an excellent *example* of Python playing well with others to make GUI
> tool: IDLE.
>
> Other widget toolkits Python plays with:  GTK+, wx... Qt (not
> exhaustive).
>
> If we throw in Jython and/or IronPython, the list expands.
>
> I've had IDLE working on Ubuntu in the past and know it can be done.
> You've no doubt visited StackOverFlow 'n all that.
>
> Kirby
>
>
>>
>> Have a good one and thanks for the message.
>>
>> Have a great 2016!!!
>>
>> Best,
>>
>> Doug.
>>
>>
>>
>
>
>
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> https://mail.python.org/mailman/listinfo/chicago
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20160121/cb68c2ed/attachment.html>


More information about the Chicago mailing list