pythonbrew icon indicating copy to clipboard operation
pythonbrew copied to clipboard

missing pip

Open twmht opened this issue 10 years ago • 8 comments

hi, I use pythonbrew to install python 2.7.7 and switch to python 2.7.7 in my Lubuntu 14.04.

pythonbrew install 2.7.7
pythonbrew switch 2.7.7

However, the pip is missing.

For example, when I run

which pip

The expected result would be /home/tumh/.pythonbrew/pythons/Python-2.7.7/bin/pip

However, it returns nothing

That is, pythonbrew does not install the pip binary into .pythonbrew directory.

I am not sure if I miss some packages.

Thank you.

twmht avatar Sep 19 '14 12:09 twmht

You need to install pip together with Python instead of Python alone.

So try this instead:

pythonbrew uninstall 2.7.7 pythonbrew install --configure="--with-zlib" 2.7.7

Also, I request that you try supporting us at: https://github.com/pybank/pythonbrew

As we are maintaining the project now.

Kentoseth avatar Sep 20 '14 11:09 Kentoseth

hi,

The installation failed when I run

pythonbrew install --configure="--with-zlib" 2.7.7

The error messages are

Downloading distribute_setup.py as /home/tumh/.pythonbrew/dists/distribute_setup.py
######################################################################## 100.0%
Installing distribute into /home/tumh/.pythonbrew/pythons/Python-2.7.7
ERROR: Failed to install setuptools. See /home/tumh/.pythonbrew/log/build.log to see why.
Skip installation of setuptools.

.pythonbrew/log/build.log shows

(cd /home/tumh/.pythonbrew/pythons/Python-2.7.7/share/man/man1; ln -s python2.1 python.1)
  File "distribute_setup.py", line 1
    <HTML><TITLE>504 Gateway Timeout</TITLE>
    ^
SyntaxError: invalid syntax

Any suggestions?

Thank you!

twmht avatar Sep 22 '14 02:09 twmht

Hello, what system are you using?

Also, is python 2.7.7 available in the config file?

If using a *nix distribution, you can check here: home/.pythonbrew/etc/config.cfg

If there is no 2.7.7 here, add it and then try running the commands (above) again.

Kentoseth avatar Sep 25 '14 23:09 Kentoseth

hi @Kentoseth ,

I am using Lubuntu 14.04

The config.cfg has configured Python 2.7.7 before.

[Python-2.7.7]
url = http://www.python.org/ftp/python/2.7.7/Python-2.7.7.tgz
latest = True

Installing setup-tool always encounters the problem.

I have installed all the dependencies as other similar issues suggest.

Any other suggestions?

Thank you!

twmht avatar Sep 26 '14 01:09 twmht

Hi there,

Yes, I see now that Python successfully downloaded, so my mistake on the config part.

I think this might work also:

Firstly, I recommended that you uninstall 2.7.7 from pythonbrew (hopefully this is done)

Now see which python you are using by typing:

python

I'm not sure which version you might be on now, but try switching pythonbrew off at this point.

(I think it is something like:

pythonbrew off

)

Now try this command:

pythonbrew install --configure="--with-zlib" 2.7.7

Tell me the outcome of this.

Kentoseth avatar Sep 26 '14 02:09 Kentoseth

hi @Kentoseth,

The python version is 2.7.6 after I uninstall 2.7.7. And 2.7.6 is my system-wide python version.

After I retry the command

pythonbrew install --configure="--with-zlib" 2.7.7

The problem still exists and the error message does not change.

Thank you.

twmht avatar Sep 26 '14 02:09 twmht

Hi there,

My apologies for the back and forth.

Can you try running this command:

pythonbrew install --configure="--with-zlib" 2.7.6

This problem is very unusual, as I managed to get 2.7.8 running with pip.

Kentoseth avatar Sep 26 '14 18:09 Kentoseth

Hi @twmht,

I get the solution. It is shown at https://github.com/pybank/pythonbrew/pull/7/files . Pip will be installed if you do the same modifying after that install python 2.7.7 by pythonbrew. Let's try it!

ysakasin avatar Oct 01 '14 05:10 ysakasin