I have a Linux CentOS 6.9 system that has python 2.6 (pre-install) and a python 3.6 installed. I install Ipython by
pip install ipython
However, the ipython seems to use python 2.6 instead of the 3.6 I installed. Is there any ways to switch that around?
Here is some extra information:
# which ipython
/usr/bin/ipython
# which python
/usr/bin/python
# which python3
/usr/local/bin/python3
As #ForceBru pointed out, you need to use python3 counterpart of pip.
Try with pip3
pip3 install ipython
Related
I'm trying to use pip to install a program specifically to python 3.6.4, but when I run
py -3.6 -m pip install package
It installs to 3.6.1
However, if I try to specify the specific version of 3.6 I want with
py -3.6.4 -m pip install package
It returns this output
Unknown option: -3
I'm guessing the argument for the version does not allow for the second period or something, but does someone else know a way to get around this? I'd prefer to do this without uninstalling 3.6.1
You can use pyenv
You should isntall pyenv and run these command
pyenv install 3.6.4
pyenv global 3.6.4
python -m pip install package
How can I install spyder 2 in Ubuntu 18.04?
When I type this in the terminal:
sudo apt-get install spyder
it installs spyder 3.
Assuming you want spyder2 for Python 2.7:
You need to install spyder for the Python version you want:
python -m pip install spyder
Then you just need to run it for that version. So:
python -m spyder
You can use pip to install it like follows
sudo pip install -Iv spyder==2.3.9
-I: reinstall (Ignore installed).
v: verbose.
https://pypi.org/project/spyder/
https://pypi.org/project/spyder/2.3.9/
I have both Python 3.5 and Python 3.6 on my laptop. I am using Ubuntu 16.04. I used pip3 to install numpy. It is working with Python3.5 but not with Python3.6. Please help.
To install via pip for specific python version use:
py -(python-version) -m pip install numpy
in your case
py -3.6 -m pip install numpy
Make sure that your Python is Python 3.6:
python --version
Python 3.6.4
Now install with:
python -m pip install numpy
This will run the pip for the current Python the option -m imports the module pip and runs it as it would be pip as command line app.
Cannot comment since I don't the rep.
If your default python is 3.5 when you check python --version, the way to go would be to find the location of the python executable for the desired version (here 3.6).
cd to that folder and then run the command given by Mike.
I seem to have multiple issues trying to install ipython in a virtual env, and work with python 2.7 in ipython.
First of all, I created a virtualenv and pip-installed ipython:
pip install ipython==1.2.1
So far, all looks good:
$ which python
~/Projects/BGLibPy/venv/bin/python
$ which ipython
~/Projects/BGLibPy/venv/bin/ipython
$ which pip
~/Projects/BGLibPy/venv/bin/pip
But the version of ipython does not match
$ ipython -V
0.13.2
and when I start ipython I see:
$ ipython
WARNING: Attempting to work in a virtualenv. If you encounter problems, please install IPython inside the virtualenv.
Python 2.6.6 (r266:84292, Aug 9 2016, 06:11:56)
And yes, I did install ipython in a virtualenv. And why is the version of python 2.6 (inside ipython) but outside its 2.7?
$ python -V
Python 2.7.13
I am confused. What is going on, and how to fix this?
Workaround: Use
python -m IPython
I'm trying to install Python-Twitch for Python 3.4. I have both 3.4 and 3.5 installed on my computer, and in command prompt I do this:
python --version
Where it gives me Python 3.5.x. Then:
set PATH=C:\Python34\;%PATH%
And python --version will then read Python 3.4.x.
Once I do 'pip install python-twitch', it installs it to the Python 3.5 Lib/Site-Packages folder. How would I get this over to 3.4?
Thanks so much for any help.
I think this was already answered: pip: dealing with multiple Python versions?
Since version 0.8, Pip supports pip-{version}. You can use it the same as easy_install-{version}:
$ pip-2.5 install myfoopackage
$ pip-2.6 install otherpackage
$ pip-2.7 install mybarpackage
EDIT: pip changed its schema to use pipVERSION instead of pip-VERSION in version 1.5. You should use the following if you have pip >= 1.5:
$ pip2.6 install otherpackage
$ pip2.7 install mybarpackage
Check https://github.com/pypa/pip/pull/1053 for more details