I'm working on a server with python 2.3.4 and cannot upgrade it. I don't have setuptools (and therefore easy_install), which I need to install pip. Looking through the easy_install docs it looks like you need 2.3.5 to be able to use easy_install. Is there a way around this? I really just want pip to work on this server.
You can't. From the PIP docs:
pip works with CPython versions 2.6, 2.7, 3.1, 3.2, 3.3 and also pypy.
pip works on Unix/Linux, OS X, and Windows.
Note: Python 2.5 was supported through v1.3.1, and Python 2.4 was supported through v1.1.
No mentions of 2.3 anywhere. You can however try the get-pip.py script from their install docs page.
Related
Ive been trying for a long time different commands but i always kept getting
Please SPecify --curl....
I tried installing pycurl in a terminal, but it was not working
Pycurl installers can directly be downloaded from from https://dl.bintray.com/pycurl/pycurl/ for your respective Python version
What's the python version you are using? PycURL is only supported for specific versions.
Python 2.7 or 3.4 through 3.6.
Other Python versions won't be able to install PycURL via pip or easy_install , you'll have to manually compile it.
I was wondering if it is possible to use Cocoa (Apple's API) with Python, so being able to run any code like in this link, so NSWorkspace functions and so on, this might be a super stupid question, but I was still wondering if it was possible...
Yes.
There are Python packages, kind of wrappers around Objective-C, install them like:
$ pip install pyobjc-core
$ pip pyobjc-framework-Cocoa
$ pip pyobjc-framework-Quartz
https://pypi.org/project/pyobjc-framework-Cocoa/
MacOS by default comes with python 2.7 and pyObjC 2.5, and has done for years. If you want a newer version of either python, such as python 3, or the newest version of pyObjC, then you have to install it yourself.
The latest version of pyObjC is 5.2.
However, on a default installation of MacOS from at least Snow Leopard onward, the following should work:
python
>>> import Appkit
>>> AppKit.NSWorkspace.sharedWorkspace().runningApplications()
Catalina is stated to be the last version to contain python bundled.
I installed python 3.0 in my windows7 and I'm trying to install the pip from the file get-pip.py .while running this file it throwing an error like
import error:Nomodule named urllib3.
I am trying to this to integrating selenium web driver packages to python in eclipse.
Thank you
From the documentation of get-pip https://pip.pypa.io/en/latest/installing/
pip works with CPython versions 2.7, 3.3, 3.4, 3.5, 3.6 and also pypy.
Restart with Python 3.3 at least instead of Python 3.0
If you have a specific requirement for an earlier version of Python 3, please explain.
I think as per below screen, pip is not installed in my system so im trying to setup it by python using python get-pip.py
I have both Python 2.7 and 3.3 installed on my system. I'm trying to hopefully write everything for 3.3. I've run into a snag. I need to install Pillow on 3.3 so I can use Images. How do I get it to install on 3.3. If I try
pip install Pillow
It comes up and says 'Requirement already satisfied(use --upgrade to upgrade): Pillow in /usr/lib/python2.7/dist-packages'
How do I get Pillow to install on 3.3, since that is where I need it?
I ran through the rest of the install(setuptools and prerequisites). Not sure where they installed. I did use the python3-setuptools for the initial install attempt. I don't know if that helped to control the flow of the prerequisites to 3.3 or not.
This is on a Linux system.
Your 2.7 and 3.3 have their own separate site-packages locations.
And, just as they have their own separate executables (usually python and python2.7 for 2.7, and python3 and python3.3 for 3.3), when you install pip for each one, they'll each have their own pip scripts (usually pip, pip2, and pip2.7 vs. pip3 and pip3.3).
So, just do this:
pip3.3 install Pillow
As a side note, if you use virtual environments, either via the third-party virtualenv package or the stdlib venv package (3.3+ only, and really not worth using until 3.4), this problem goes away: when you're inside a virtual environment, it's either a 2.7 environment or a 3.3 environment, and it's as if nothing else exists.
The basic design is explained in PEP 394. How pip fits into that design is explained in… as far as I know, docs that haven't been written yet, but will hopefully be part of Python 3.4.0 and/or pip 1.5.something.
Older versions of pip (I believe before 1.5.0) would use pip and pip-2.7 vs. pip and pip-3.3, which obviously leads to a bit of confusion.
And some distros have their own python-pip packages that do things differently. And then there's Arch, where python actually means 3.2. And so on.
But the basic idea is that when you have Python X.Y and V.W side by side, there will be some way to differentiate explicitly.
I have 3 python versions, I want to easy_install Orange using the second version. How can I do this?
Unnecessary info:
2.1 in /usr/bin/python
2.6 in /Library/Frameworks/Python.framework/Versions/2.6/bin/python
3.1 in /Library/Frameworks/Python.framework/Versions/3.1/bin/python
Answer:
Ok found it here (http://peak.telecommunity.com/DevCenter/EasyInstall#multiple-python-versions),
"Also, if you're working with Python version 2.4 or higher, you can run Python with -m easy_install to run that particular Python version's easy_install command"
Just so the answer is easy to find:
Using "Python-version" with the m-parameter and easy_install afterwards does the trick.
Example:
python2.7 -m easy_install https://bitbucket.org/james_taylor/bx-python/get/tip.tar.bz2
easy_install is usually/always installed per Python version. So you run the related version of easy_install installed for your particular Python version/interpreter you want to use here.
Say your python version is 3.5. Then you can use the command easy_install-3.5 followed by the name of the module you are willing to download/install. See documentation here.
From the doc, besides the reported option
python2.7 -m easy_install
there is also:
if you install EasyInstall for both Python 2.3 and 2.4, you can use the easy_install-2.3 or easy_install-2.4 scripts to install packages for Python 2.3 or 2.4