[Tutor] pip install
Hey all, I'm trying to set up a virtual environment. I've used Windows Powershell on my desktop with Windows 10. I was able only to get to 2.5 minutes of a 9.75 minute video before getting frozen, not just stuck. I was unable to activate the batch file even though everything appeared to be where it should be. I then found out about Linux Bash Shell for Windows and used that, I next successfully installed virtualenv, but when I went to run it it said command virtualenv not found but can be installed with sudo apt install virtualenv, which I did, then tried to run 'virtualenv pdxCrime' (without the apostrophes) and it errors out with command virtualenv not found, did you mean: command 'virtualenv' from deb virtualenv Try: sudo apt install My bash shell is Ubuntu not debian. Not sure if that makes a difference. I don't understand what is. I don't understand why virtualenv isn't found when it was successfully installed and every piece of documentation I've found tells me to use that word or command. The only reason I ask this forum is because the instructor of the video hasn't responded to my email yet and this seems to be related to python somehow although I'm a little foggy about that. If this is not the forum please tell me where to go (be nice). Thank you. -- Roger Lea Scherer 623.255.7719 *Strengths:* Input, Strategic, Responsibility, Learner, Ideation ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] pip install
On 10/15/2018 04:11 PM, Roger Lea Scherer wrote: > Hey all, > > I'm trying to set up a virtual environment. I've used Windows Powershell on > my desktop with Windows 10. I was able only to get to 2.5 minutes of a 9.75 > minute video before getting frozen, not just stuck. I was unable to > activate the batch file even though everything appeared to be where it > should be. I then found out about Linux Bash Shell for Windows and used > that, I next successfully installed virtualenv, but when I went to run it > it said command virtualenv not found but can be installed with sudo apt > install virtualenv, which I did, then tried to run 'virtualenv pdxCrime' > (without the apostrophes) and it errors out with > > command virtualenv not found, did you mean: > > command 'virtualenv' from deb virtualenv > > Try: sudo apt install > > My bash shell is Ubuntu not debian. Not sure if that makes a difference. Ubuntu, Debian, Linux Mint, and a number of others share the characteristic that they use the "Debian Package Manager" dpkg, and the packages themselves are colloquially called "debs". So no, it doesn't make a difference. > > I don't understand what is. I don't understand why virtualenv > isn't found when it was successfully installed and every piece of > documentation I've found tells me to use that word or command. > > The only reason I ask this forum is because the instructor of the video > hasn't responded to my email yet and this seems to be related to python > somehow although I'm a little foggy about that. If this is not the forum > please tell me where to go (be nice). > > Thank you. > Try this page in the standard docs - you don't necessarily even have to use the command named 'virtualenv': https://docs.python.org/3/library/venv.html ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] what does the forward slash mean in this function signature?
From: eryk sun Sent: Monday, October 15, 2018 12:10 PM To: tutor@python.org Cc: sjeik_ap...@hotmail.com Subject: Re: [Tutor] what does the forward slash mean in this function signature? On Mon, Oct 15, 2018 at 6:00 AM Albert-Jan Roskam wrote: > > In Python 3.6 (Windows) I often see a forward slash in a function signature, > see below. > What does it mean? I vaguely remember reading something about new > possbilities in > python 3, something like "def foo(x, *, y)". Perhaps it's related to that? > > >>> help({}.fromkeys) > Help on built-in function fromkeys: > > fromkeys(iterable, value=None, /) method of builtins.type instance > Returns a new dict with keys from iterable and values equal to value. This syntax is for position-only function parameters. It's used by Argument Clinic [1], a preprocessor used internally to develop CPython. Position-only parameters have also been proposed for the language grammar, first in PEP 457 and again in PEP 570 [2]. [1]: https://docs.python.org/3/howto/clinic.html#converting-your-first-function [2]: https://www.python.org/dev/peps/pep-0570 > Hi Eryk, Thank you, that's interesting to know. I wasn't even aware of position-only parameters until I read about them. Of course I've used ord() many times, I just thought it has a keyword argument. Why even bother to have positional-only params? I agree that ord('a') reads more easily than ord(character='a'), but other than that I don't see an advantage to enforce it. The pages you mentioned also made me read about function annotations and type hints. Do you know why type hints were designed while there are already are parseable docstring notations (sphinx :param foo: int, numpydoc (much prettier IMHO), and others)? The type hints remind of Cython, but "Type annotations should not be confused with variable declarations in statically typed languages. The goal of annotation syntax is to provide an easy way to specify structured type metadata for third party tools." [1] Thanks! Albert-Jan [1] https://www.python.org/dev/peps/pep-0526/ ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] pip install
I never had any success with Windows and python, and even the Ubuntu shell which Windows do offer as a feature isnt that good in my opinion. But a big googling gave me this tutorial.. http://timmyreilly.azurewebsites.net/python-pip-virtualenv-installation-on-windows Might be bit more useful ? 16. okt. 2018 10.31 AM skrev "Roger Lea Scherer" : Hey all, I'm trying to set up a virtual environment. I've used Windows Powershell on my desktop with Windows 10. I was able only to get to 2.5 minutes of a 9.75 minute video before getting frozen, not just stuck. I was unable to activate the batch file even though everything appeared to be where it should be. I then found out about Linux Bash Shell for Windows and used that, I next successfully installed virtualenv, but when I went to run it it said command virtualenv not found but can be installed with sudo apt install virtualenv, which I did, then tried to run 'virtualenv pdxCrime' (without the apostrophes) and it errors out with command virtualenv not found, did you mean: command 'virtualenv' from deb virtualenv Try: sudo apt install My bash shell is Ubuntu not debian. Not sure if that makes a difference. I don't understand what is. I don't understand why virtualenv isn't found when it was successfully installed and every piece of documentation I've found tells me to use that word or command. The only reason I ask this forum is because the instructor of the video hasn't responded to my email yet and this seems to be related to python somehow although I'm a little foggy about that. If this is not the forum please tell me where to go (be nice). Thank you. -- Roger Lea Scherer 623.255.7719 *Strengths:* Input, Strategic, Responsibility, Learner, Ideation ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor