Re: [Tutor] can't install
On Sunday, December 29, 2013 9:11 PM, Tobias M. t...@tobix.eu wrote: prefix/bin/pyvenv ~/my_venv source ~/my_venv/bin/activate wget python-distribute.org/distribute_setup.py python distribute_setup.py Hi, can i ask why the name ~/my_venv/ .. is that just to indicate ~ as the home directory? so pyvenv already has access to virtualenv? i thought i would have needed pypi https://pypi.python.org/pypi/virtualenv or easy_install before i got install it, but here you create the virtualenv before getting distribute_setup.py. Everything seems fine now, at last! I really appreciate your help;)___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] can't install
Quoting Lolo Lolo losermelo...@yahoo.com: Hi, can i ask why the name ~/my_venv/ .. is that just to indicate ~ as the home directory? The name was just an example. Yes, '~' is your home directory. You can actually use this in your shell instead of typing the whole path. You probably want to put virtual environments in your home directory. so pyvenv already has access to virtualenv? i thought i would have needed pypi https://pypi.python.org/pypi/virtualenv or easy_install before i got install it, but here you create the virtualenv before getting distribute_setup.py. Since Python 3.3 a 'venv' module is included in the standard library and shipped with the pyvenv tool. So you no longer need the 'virtualenv' 3rd party module. Everything seems fine now, at last! I really appreciate your help;) Great :) ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] can't install
On Mon, Dec 30, 2013 at 7:42 PM, Tobias M. t...@tobix.eu wrote: Yes, '~' is your home directory. You can actually use this in your shell instead of typing the whole path. The tilde shortcut is a C shell legacy inspired by the 1970s ADM-3A terminal, which had Home and tilde on the same key. Python has os.path.expanduser('~'), which also works on Windows even though using tilde like this isn't a Windows convention. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] can't install
On Wed, Dec 25, 2013 at 2:16 AM, Tobias M. t...@tobix.eu wrote: ./configure --prefix=prefix where prefix is a custom path (e.g. in your home directory) where you want to install python. You can configure without the --prefix option, but if you just want to use this python installation for virtuelenvs I would install it separate from the rest of the system. Then you can build and install Python: Hi Tobias can i just ask. As i already have Python 3.3, when i install this separate version of 3.3, will there be a conflict on the command line when i type python3.3? This install i want just for virtualenvs but i wonder if it would replace my other 3.3 as the default on the command line? On Wednesday, December 25, 2013 1:46 PM, Lolo Lolo losermelo...@yahoo.com wrote: On Wed, Dec 25, 2013 at 2:16 AM, Tobias M. t...@tobix.eu wrote: Is this the error you get when executing distribute_setup.py? urllib.error.URLError: urlopen error unknown url type: https Thank you so much Tobias. And yes, that was the exact error message On Tue, Dec 24, 2013 at 11:36 PM, Steven D'Aprano st...@pearwood.info wrote: But the good news is that all this should become history from Python 3.4 onwards, there are plans to include pip in 3.4. also thanks Steven. I'll definately upgrade to Python 3.4___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] can't install
Quoting Lolo Lolo losermelo...@yahoo.com: Hi Tobias can i just ask. As i already have Python 3.3, when i install this separate version of 3.3, will there be a conflict on the command line when i type python3.3? This install i want just for virtualenvs but i wonder if it would replace my other 3.3 as the default on the command line? As long as you install the new 3.3 build in a custom path (via --prefix) it will not overwrite your current installation and by default python3.3 will invoke the standard installation (probably in your /usr directory). To use your custom build in virtualenvs make sure you create the virtualenv with the python interpreter of that build (the one in the prefix/bin directory). Your virtualenv will link to this installation and when your virtualenv is active, python3.3 will invoke the interpreter from your own build. I hope this explaination is understandable (and correct), if not just ask. When using virtualenvs the first time I found it very confusing, too. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] can't install
Quoting Tobias M. t...@tobix.eu: Quoting Lolo Lolo losermelo...@yahoo.com: Hi Tobias can i just ask. As i already have Python 3.3, when i install this separate version of 3.3, will there be a conflict on the command line when i type python3.3? This install i want just for virtualenvs but i wonder if it would replace my other 3.3 as the default on the command line? As long as you install the new 3.3 build in a custom path (via --prefix) it will not overwrite your current installation and by default python3.3 will invoke the standard installation (probably in your /usr directory). To use your custom build in virtualenvs make sure you create the virtualenv with the python interpreter of that build (the one in the prefix/bin directory). Your virtualenv will link to this installation and when your virtualenv is active, python3.3 will invoke the interpreter from your own build. I hope this explaination is understandable (and correct), if not just ask. When using virtualenvs the first time I found it very confusing, too. Another hint, if you are not sure which interpreter is started when using python3.3 at the command line: In interactive mode the date and time of the build are displayed at the beginning and you can get the full path of the current python interpreter with: import sys sys.executable ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] can't install
On Wed, Dec 25, 2013 at 2:16 AM, Tobias M. t...@tobix.eu wrote: Is this the error you get when executing distribute_setup.py? urllib.error.URLError: urlopen error unknown url type: https Thank you so much Tobias. And yes, that was the exact error message On Tue, Dec 24, 2013 at 11:36 PM, Steven D'Aprano st...@pearwood.info wrote: But the good news is that all this should become history from Python 3.4 onwards, there are plans to include pip in 3.4. also thanks Steven. I'll definately upgrade to Python 3.4___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
[Tutor] can't install
ive struggled all day to install pip on ubuntu 12.04 for python 3.3 . The only pip in the apt-get cache is for python 2. i tried to download pip from source but setuptools is missing when it tries to import it. This made me download setuptools with apt-get but the version there is only for python 3.2 I've also download the distribute_setup.py file to get pip through easy_install but it returns errors when it uses urllib.request. Something to do with https, although the same distribute_setup.py worked perfectly when i used it on windows for 3.1 and 3.3. This all started because i wanted to use virtualenv. After installing it i couldn't use it cos it needed zlib which i didn't have. apt-get only has zlib for python 2.7. I'm now at my wit's end. Life was great using windows. Everyone told me try ubuntu, now life is so stressful, even on christmas eve:( Any ideas on how to solve this issue would be appreciated:(___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] can't install
On Tue, Dec 24, 2013 at 11:15:36AM -0800, Lolo Lolo wrote: ive struggled all day to install pip on ubuntu 12.04 for python 3.3 . All your questions are really about the Ubuntu packaging system, not learning Python. You may have better answers from an Ubuntu forum. I fear that the best I can give you is sympathy. Perhaps an Ubuntu user will be more useful. But the good news is that all this should become history from Python 3.4 onwards, there are plans to include pip in 3.4. -- Steven ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] can't install
On 24.12.2013 20:15, Lolo Lolo wrote: ive struggled all day to install pip on ubuntu 12.04 for python 3.3 . The only pip in the apt-get cache is for python 2. i tried to download pip from source but setuptools is missing when it tries to import it. This made me download setuptools with apt-get but the version there is only for python 3.2 I've also download the distribute_setup.py file to get pip through easy_install but it returns errors when it uses urllib.request. Something to do with https, although the same distribute_setup.py worked perfectly when i used it on windows for 3.1 and 3.3. I guess I just had the same problem. Is this the error you get when executing distribute_setup.py? urllib.error.URLError: urlopen error unknown url type: https If yes, Python3.3 is missing ssl support. You can build python from source to get ssl support. Before doing so, you must make sure ssl is installed on your system: sudo apt-get install libssl-dev Then you download the python sources and do: ./configure --prefix=prefix where prefix is a custom path (e.g. in your home directory) where you want to install python. You can configure without the --prefix option, but if you just want to use this python installation for virtuelenvs I would install it separate from the rest of the system. Then you can build and install Python: make make install Note that after the first make a list of modules that were not build is displayed. '_ssl' should NOT be listed. Then you can create a virtualenv with your custom python build and should be able to install easy_install with distribute_setup.py: prefix/bin/pyvenv ~/my_venv source ~/my_venv/bin/activate wget python-distribute.org/distribute_setup.py python distribute_setup.py I don't know if there is a better way to get a virtual environment with python3.3 and ssl support in Ubuntu, but this worked for me :) ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Can't install latest PIL
If you see a syntax error, that means your code could not be compiled. Python's parser doesn't grok import image from pil. In natural language we have the freedom to swap the order of clauses, but programming languages are generally more rigid. The correct order is from pil import image -- but actually it has to be from PIL import Image. Yeah, I fixed that but it still blew a fuse. Going back to 32 bit fixed everything. from ** import ** just sounds backward to me, so I'll get it wrong until I get it right. Actually, it is backward by standard English - a design flub ;') BTW, I noticed that Msoft Visual Studio has Python. Does that mean I could made a standalone Win executable with Python, or would a user still need the Py interpreter installed? It would be nice if you could make an exe. Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Can't install latest PIL
On Fri, May 17, 2013 at 3:23 AM, Jim Mooney cybervigila...@gmail.com wrote: BTW, I noticed that Msoft Visual Studio has Python. Does that mean I could made a standalone Win executable with Python, or would a user still need the Py interpreter installed? It would be nice if you could make an exe. Are you referring to Python Tools for Visual Studio? PTVS lets you use Visual Studio as a Python IDE: http://pytools.codeplex.com For CPython, one option for creating an exe is py2exe: http://www.py2exe.org/index.cgi/Tutorial If you're referring to IronPython, that's a .NET implementation of Python: http://ironpython.codeplex.com http://www.ironpython.info Here's a tutorial on creating an exe with IronPython: http://dbaportal.eu/2009/12/21/ironpython-how-to-compile-exe ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
[Tutor] Can't install latest PIL
Okay, I'm trying to install the latest PIL on win 7. It claims Python 2.7 was not found in the registry, although it's installed, on a path, and works fine. The install box lets you type in a directory but won't accept typing. I'm stumped. I guess the way around this is to know what I have to put in the registry. -- Jim Mooney “For anything that matters, the timing is never quite right, the resources are always a little short, and the people who affect the outcome are always ambivalent.” ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Can't install latest PIL
On Thu, May 16, 2013 at 2:12 AM, Jim Mooney cybervigila...@gmail.com wrote: Okay, I'm trying to install the latest PIL on win 7. It claims Python 2.7 was not found in the registry, although it's installed, on a path, and works fine. The install box lets you type in a directory but won't accept typing. I'm stumped. I guess the way around this is to know what I have to put in the registry. Make sure you have the correct architecture. The builds from PythonWare are 32-bit. Christoph Gohlke has 64-bit builds here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pil As far as the registry goes, installing for everyone uses HKLM (local machine), else an installation uses HKCU (current user). The installed versions are in subkeys of [HKLM|HKCU]\Software\Python\PythonCore. Also, for WoW64 processes (i.e. 32-bit running on 64-bit Windows) the Software key is redirected to Software\Wow64Node. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Can't install latest PIL
Hi, On 16 May 2013 07:12, Jim Mooney cybervigila...@gmail.com wrote: Okay, I'm trying to install the latest PIL on win 7. It claims Python 2.7 was not found in the registry, although it's installed, on a path, and works fine. The install box lets you type in a directory but won't accept typing. I'm stumped. Are you using Python 32-bit or Python 64-bit? I'm guessing/seem to remember from your other posts, it's 64-bit and I'm guessing you're trying to install PIL for 32-bit Windows, which behaves in the way you describe if you try to use it on a Python 64-bit build. If I'm right, and you're indeed running 64-bit Windows, then you need to instead get a 64-bit build of PIL to match your Python build. Unfortunately the official PIL page does not contain 64-bit builds, however you can get an unofficial (meaning, done by a third party) version here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pil Walter ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Can't install latest PIL
Make sure you have the correct architecture. The builds from PythonWare are 32-bit. Christoph Gohlke has 64-bit builds here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pil == Okay, I installed the 64 bit for Py 2.7, it installed, I see PIL directory in Site-Packages. (Actually, it's the Pillow fork, but it still seems to be named PIL) I tried import image from pil and got the following error: SyntaxError invalid syntax (python_init.py, line 1) I don't see where that prog is, so it's an install somewhere and I don't want to mess with it anyway. Oh well, be nice to get back to learning Python after wrestling with editors, installs, and Windows ;') Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Can't install latest PIL
You may want to consider pillow. Oil hasn't been maintained in some time. On May 16, 2013 6:12 PM, Jim Mooney cybervigila...@gmail.com wrote: Make sure you have the correct architecture. The builds from PythonWare are 32-bit. Christoph Gohlke has 64-bit builds here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pil == Okay, I installed the 64 bit for Py 2.7, it installed, I see PIL directory in Site-Packages. (Actually, it's the Pillow fork, but it still seems to be named PIL) I tried import image from pil and got the following error: SyntaxError invalid syntax (python_init.py, line 1) I don't see where that prog is, so it's an install somewhere and I don't want to mess with it anyway. Oh well, be nice to get back to learning Python after wrestling with editors, installs, and Windows ;') Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Can't install latest PIL
On 16 May 2013 16:11, James Reynolds eire1...@gmail.com wrote: You may want to consider pillow. Oil hasn't been maintained in some time. Actually, I installed Pillow. But then I deleted everything and started over with 32 bit. I got greedy figuring I'd get the fastest Py with 64 bit, but there are too many kludges involved and I'm tired of it so heave-ho on all the 64 bit. Back to 32 bit. All modules and showing pretty pictures with Py work again. It doesn't pay to be greedy (except with regular expressions, of course) Jim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Can't install latest PIL
On Thu, May 16, 2013 at 6:12 PM, Jim Mooney cybervigila...@gmail.com wrote: I tried import image from pil and got the following error: SyntaxError invalid syntax (python_init.py, line 1) If you see a syntax error, that means your code could not be compiled. Python's parser doesn't grok import image from pil. In natural language we have the freedom to swap the order of clauses, but programming languages are generally more rigid. The correct order is from pil import image -- but actually it has to be from PIL import Image. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor