Ipython with version 2.6 instead of 2.7

I am trying to configure iPython to use version 2.6 instead of 2.7. Is there any way to do this?

Additional Information. I am trying to configure an iPython laptop to develop a Spark application, however the python version for the entire cluster is 2.6, where only the node name has the latest version of python Anaconda installed 2.7. In this case, when I started the python laptop, it will use 2.7 as an interpreter, and I encountered errors when I tried to spread this work.

Instead of updating the whole set to use 2.7, I prefer to downgrade the version of iPython on the node name to 2.6, is there any way to do this?

Update:

Thanks for the suggestion from Jivan, it’s actually quite simple to use python virtualenv to install an older version of iPython inside a virtual environment, when you want to use it, you can look like a bash script, this will be a suitable iPython environment for laptops that supports the python version in cluster.

#!/bin/bash which python source /root/user/python-ev/bin/activate which python ipython notebook --profile=pyspark 
+5
source share
1 answer

iPython 1.0 is the latest major version of iPython to support Python <2.7.

Therefore, you need to install iPython 1.2.1 if it is not already done.

Now, to associate it with Python2.6:

 $ sudo python2.6 setup.py install 

Additional information at this link . The author skipped the part about which version of iPython to use, since at that time all versions of iPython supported Python <2.7.

It may work, but it is not defined because it depends on your existing configuration, etc.

If this is not the case, another way (a bit hacked) can be found here .

+5
source

Source: https://habr.com/ru/post/1210017/


All Articles