5 ms·
It'd be really nice if they followed python3, and named it ipython3. This is just going to confuse install processes if I now have to install "ipython<6".
by bjt2n3904 10y ago
It'd be really nice if they followed python3, and named it ipython3. This is just going to confuse install processes if I now have to install "ipython<6".
- oliwarner 10y agoIt's unnecessary. You don't need to jump through those hoops. Pip can handle all sorts of requirements including Python version, OS, etc. pip install ipython currently grabs ipython-5.3.0 on Python 2.7.
- takluyver 10y agoIt does! But make sure to update pip itself (pip install --upgrade pip), because it only does the right thing as of pip 9.0. Some of the IPython team actually worked on the infrastructure (pip & pypi) to make this possible, to minimise the pain for installing on Python 2.
- cookiecaper 10y agoThis recommendation should really be updated IMO. `python3` will never see full adoption as long as `python` is reserved for Python 2. I understand the need as a compatibility thing, but at some point the forward-looking cost of distinguishing `python3` exceeds the legacy cost of applications that just say `python` when they mean `python2`.
- CJefferson 10y agoThe best option (in my opinion) would be to add a simple way on the first line of a python file to express the language. Then 'python' can read the file, and execute it under the right language. The problem is if we ever switch 'python' to 'python3', then there will be 5 or so years when 'python' becomes unusable, as you won't know on a given machine if it's python2 or python3, and almost no program works on both.
- takluyver 10y ago> if we ever switch 'python' to 'python3'... you won't know on a given machine if it's python2 or python3 This kind of already happened. Arch already has Python 3 as 'python', and if you use any of the popular environment tools (virtualenv, pyenv, conda), whichever version of Python you pick when creating an environment will be 'python' inside that env. It's not that big a problem, though. It's quite possible to write code that runs on both Python 2 and 3, and it's surprisingly rare (in my experience) to call unqualified 'python' rather than using an explicit path.
- takeda 10y agoThere's no need, if you use virtualenv (as you should) you'll get the right version. I really like that I can install command line tools and then just reference: <virtual env>/bin/<tool name> and it will run it with the correct interpreter.
- CJefferson 10y agoThat's fine for me and you, but no good for just distributing a script. Then I want to be able to just say to people 'run this script', maybe explain 'chmod +x' to them at best. Every extra step is a pain, and virtual env is a major pain.
- takeda 10y agoI'm not sure what are you talking about, if you use entry_points in setup.py then it will create right entries, set proper permissions and ensure the right python is run. If you use setuptools correctly it is fairly easy to install and run packages e.g.: venv-3.5 my_env my_env/bin/pip install mypackage or if you don't want to publish it to PyPi: venv-3.5 my_env my_env/bin/pip install mypackage.whl
- CJefferson 10y agoI'm talking about ease of use for non-experts. I sometimes send people python scripts, I can just tell them to run it from the command line. I can assume any linux or Mac OS X distro will have some version of python2 installed, so I can just say "run 'python myscript.py'". If I give them your instructions, then from my computer I don't have venv-3.5, or venv. I'm sure they won't either. Standard ubuntu installs don't have virtualenv or pip either, so non-root users have pain installing any of these things.
- jhasse 10y agoI hate that. For example many IDEs look for pylint, not pylint3 or pylint-3 ... The one without a version number should be a symlink instead. RPM and DEB support that.
- kzrdude 10y agoThe `ipython3` command already exists regardless! (You should try it.) On my particular configuration: $ ipython3 Python 3.5.2 |Anaconda 4.2.0 (64-bit)| (default, Jul 2 2016, 17:53:06) Type "copyright", "credits" or "license" for more information. IPython 5.1.0 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details. Enabling tab completion In [1]:
- WorldMaker 10y agoThat's not necessarily a Python thing, but a Linux distribution thing or whichever package manager or installer you are using. I like all my Python 3+ installs just called python, personally.
- Nullabillity 10y agoIt is a Python thing, see https://www.python.org/dev/peps/pep-0394/ https://www.python.org/dev/peps/pep-0394/. And changing the definition of `python` is just going to cause issues again once Python 4 eventually comes around.
- takeda 10y agoIn 3 years python 2.7 will be EOL (it already is in maintenance mode). There's no good reason to prefix it that way.
- simonbyrne 10y agoI may be wrong, but this is simply saying that jupyter (the notebook interface) requires python 3, not IPython (the backend interface), which should still support python 2.
- carreau 10y agoRead the blog post http://blog.jupyter.org/2017/04/19/release-of-ipython-6-0/ http://blog.jupyter.org/2017/04/19/release-of-ipython-6-0/ it's IPython which drop support for 2.7 not Jupyter notebook (yet).
- carreau 10y agoPlease read the blogpost (http://blog.jupyter.org/2017/04/19/release-of-ipython-6-0/ http://blog.jupyter.org/2017/04/19/release-of-ipython-6-0/) we went to great length to make sure that `pip install ipython` just install the right IPython. `pip install ipython` will just install 5.x on Python 2. So you don't have to worry about which versions are incompatible.