Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am trying to get that latest version of python on a Mac Mountain Lion. But the latest version is 2.7.4, but when I run brew install python it downloads the 2.7.2. What is going on?
brew install python
==> Downloading http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tar.bz2
File already downloaded in /Users/pietro/Library/Caches/Homebrew
==> Patching patching file Lib/whichdb.py
Hunk #1 succeeded at 91 with fuzz 1.
==> ./configure --prefix=/usr/local/Cellar/python/2.7.2 --enable-shared
==> make
==> make install
==> Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.24.tar.gz
File already downloaded in /Users/pietro/Library/Caches/Homebrew
==> /usr/local/Cellar/python/2.7.2/bin/python setup.py install
==> Caveats
A "distutils.cfg" has been written to: /usr/local/Cellar/python/2.7.2/lib/python2.7/distutils specifing the
install-scripts folder as: /usr/local/share/python
If you install Python packages via "python setup.py install",
easy_install, pip, any provided scripts will go into the
install-scripts folder above, so you may want to add it to your PATH.
Distribute has been installed, so easy_install is available. To update
distribute itself outside of Homebrew:
/usr/local/share/python/easy_install pip
/usr/local/share/python/pip install --upgrade distribute
See: https://github.com/mxcl/homebrew/wiki/Homebrew-and-Python
==> Summary
/usr/local/Cellar/python/2.7.2: 4803 files, 81M, built in 2.4 minutes
Have you updated Homebrew lately (by running brew up)? 2.7.4 is the current Python version in Homebrew.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I have downloaded WinPython 3.8.5 I can see the folder inside is python-3.8.5.amd64 which is good but when I stroke python --version (in WinPython Scripts folder) it throws me 2.7 :(
Then when I pip install a module I have this warning :
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
In Program Files I have a folder : Python.2715
What's the problem here ? Help please, how can I have Python 3 with WinPython ?
Put the WinPython folder containing python.exe earlier to your PATH environment variable than other Python folders. Verify the version by running python -V.
To install packages, use python -m pip install ... instead of pip install .... (It looks like pip install tries to use the pip command from another version of Python on your PATH. Maybe the direct reason for this is that your WinPython folder doesn't contain the pip command or the relevant subfolder is not on your PATH. To fix pip install, you may want to reinstall WinPython, and then report a bug to the WinPython maintainers.)
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have pip installed on Windows (bundled with ActivePython), Debian 7 (installed via sudo apt-get install python-pip) and OSX 10.8 (installed via easy_install pip).
I want to download mercurial package without installing it (just a .tar.gaz archive) so i issued following documented command:
pip install --download=. mercurial
On Windows it works, but no file appears in current directory. On Debian and OSX it fails like this:
Downloading/unpacking mercurial
Running setup.py egg_info for package mercurial
...
lots of text, complains about no headers to compile
What i'm doing wrong? I was sure that pip is not supposed to actually run something with --download command, but it seems that on both Debian and OSX it is trying to install package after downloading :(.
It doesn't actually build and install the package, but it does do the egg_info step, if that's available for your package on your platform. You can see this from your output (or from ~/.pip/pip.log):
Running setup.py egg_info for package mercurial
…
Command python setup.py egg_info failed with error code 1 in /var/folders/fl/kgrflrj92pv1yjr_918x0t800000gq/T/pip-build/mercurial
Whether that step succeeds or fails, you still end up with nothing installed to site-packages. However, you may not end up with the tarball in your target directory unless it succeeds. (From a very quick test, it looks like 1.2.1 and 1.4dev1 under Python 2.7.2 both fail to copy the tarball to the target if it fails, while 1.4dev1 under 3.3.0 copies it ether way… But that may be misleading; it's possible that the difference has to do with whether the tarball is already in the download-cache or something…)
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I try to install mercurial on a centos vps-server with "yum install mercurial" but it says it needs python2.4 in order to install it. I have python2.6 installed. Is there a way to get past this?
You should not have messed with your system Python --
it is incrdible you can still login at all. Python 2.4 is ancient, but it is what is used in a lot of CentOS versions in the wild - what is installed by it's package management. Maybe you had installed a ",meta package" taht upgrades the system Python to 2.6, along with everything that depends on it (yum included).
Anyway, 2.4 would be sub-optimal to install mercurial.
Since your system is a mess already, you can simply easy_install mercurial into your system Python instead of trying to use yum for it.
"sudo easy_install mercurial" -- if you don't have easy_install, try "yum install setuptools" first. If this does not work, search on pipy.python.org for setuptools, install it manually - -and think seriously on rebuilding this machinne - you will have to do it soon.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have been using the standard python that comes with OS X Lion (2.7.2) but I wanted to build a UCS-4 version to handle 4-byte unicode characters better.
I had already installed pip and packages like pytz, virtualenv and virtualenvwrapper, etc., and these are installed in /Library/Python/2.7/site-packages. My $PATH is /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin.
To build a new version of python on the machine (outside of any project specific virtual environments, that will come later), I followed the instructions on this article and managed to build it in /usr/local/bin. The problem is that when I launched a new bash window, I got the following virtualenvwrapper error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named virtualenvwrapper.hook_loader virtualenvwrapper.sh: There was a problem running the initialization hooks.
If Python could not import the module virtualenvwrapper.hook_loader, check that virtualenv has been installed for VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python and that PATH is set properly.
The instructions said to move /usr/local/bin to the top of the /etc/paths file, and since then I've noticed some strange issues. I installed pip into /usr/local/bin and now I have assumed that since I'm working in /usr/local/bin, and the newly installed python's site packages is now located in /usr/local/lib/python2.7/site-packages, when I do pip freeze, it should be empty as nothing is installed there yet. However, pip freeze still reports things installed in the old (OS X) site-packages folder. Here's some info after the build:
$ which python
/usr/local/bin/python
$ which pip
/usr/local/bin/pip
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
When I uninstall a python package with pip, it removes it from the old site-packages folder as expected. When I install it again, instead of installing it in /usr/local/lib/python2.7/site-packages, it installs it in /Library/Python/2.7/site-packages (verified by attempting to install it again and receiving Requirement already satisfied (use --upgrade to upgrade): pytz in /Library/Python/2.7/site-packages
). How is it getting that path for the old site-packages folder? Why won't it install it in the correct location for the python install it's using?
I'm getting several other issues since promoting /usr/local/bin but I think if I understand this I'll be able to get somewhere.
Can anyone see what's happening? If you need any more info I'll be happy to provide it.
Since you will be using the custom python installation as your main one, I suggest you uninstall all non-standard packages from the system python and make sure that the existing easy_install.py is gone (possibly by manually removing it). Then download distribute's distribute_setup.py and run it with the new interpreter. From then on everything should work as expected.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
"I am using ubuntu 12.04 and by default python 2.7 is installed .I want python 2.6 .
When I used
apt-get install python2.6
I am getting error
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python2.6 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
python-gdbm
E: Package 'python2.6' has no installation candidate
Thanks in advance."
As per the Ubuntu Wiki - Python Toolchain, Python 2.6 is no longer available in the repository.
Either:
You can simply build it from source by downloading the tarball from
Python 2.6.7
You need to find out some repository which might have an older version of
Python. One alternative is
https://launchpad.net/~fkrull/+archive/deadsnakes
You need to install the PPA
sudo add-apt-repository ppa:fkrull/deadsnakes
Run Update:
sudo apt-get update
And then install the version you are looking for
sudo apt-get install python2.6 python2.6-dev