No module named pip.__main__; 'pip' is a package and cannot be directly executed

Hi,

When I tried to generate a certificate for a new domain certbot-auto started to upgrade from 0.30.2 to 0.32.0 but failed with this output:

Upgrading certbot-auto 0.30.2 to 0.32.0...
Replacing certbot-auto...
Creating virtual environment...
Installing Python packages...
/opt/eff.org/certbot/venv/bin/python: No module named pip.__main__; 'pip' is a package and cannot be directly executed
Traceback (most recent call last):
  File "/tmp/tmp.PScBmyRocA/pipstrap.py", line 177, in <module>
    sys.exit(main())
  File "/tmp/tmp.PScBmyRocA/pipstrap.py", line 149, in main
    pip_version = StrictVersion(check_output([python, '-m', 'pip', '--version'])
  File "/usr/lib/python2.7/subprocess.py", line 544, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/opt/eff.org/certbot/venv/bin/python', '-m', 'pip', '--version']' returned non-zero exit status 1

Trying to run any certbot-auto command results in it wanting to upgrade and fails. Using the --no-self-upgrade option results in failing to create a virtual environment (I assume because of the failed upgrade?):

Creating virtual environment...
Traceback (most recent call last):
  File "/usr/bin/virtualenv", line 3, in <module>
    virtualenv.main()
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 880, in main
    interpreter = resolve_interpreter(options.python)
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 1536, in resolve_interpreter
    if os.path.abspath(exe) != exe:
  File "/usr/lib/python2.7/posixpath.py", line 347, in abspath
    cwd = os.getcwd()
OSError: [Errno 2] No such file or directory

OS: ubuntu 12.04.5
python: 2.7.3-0ubuntu2.2
python-pip: 1.0-1build1

I know the server is old and needs to be migrated in the near future, but for now can anyone tell me how could I fix this problem so I can generate the certificate?

A post was merged into an existing topic: Cant renew. certbot-auto not working on Debian Wheezy. Please help