1

仮想環境をセットアップしようとしていますが、次のエラーが表示されます。

 $virtualenv ./olp/
New python executable in ./olp/bin/python
Installing setuptools............done.
Installing pip.....
  Complete output from command /home/tom/Documents/Dev/olp/bin/python -x /home/tom/Documents/Dev/olp/bin/easy_install ./pip-X.X.tar.gz:
  Processing pip-X.X.tar.gz
error: Not a recognized archive type: ./pip-X.X.tar.gz
----------------------------------------
...Installing pip...done.
Traceback (most recent call last):
  File "/usr/local/bin/virtualenv", line 9, in <module>
    load_entry_point('virtualenv==1.9.1', 'console_scripts', 'virtualenv')()
  File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 979, in main
    no_pip=options.no_pip)
  File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 1094, in create_environment
    install_pip(py_executable, search_dirs=search_dirs, never_download=never_download)
  File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 667, in install_pip
    filter_stdout=_filter_setup)
  File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 1057, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /home/tom/Documents/Dev/olp/bin/python -x /home/tom/Documents/Dev/olp/bin/easy_install ./pip-X.X.tar.gz failed with error code 1

次に、仮想環境を作成するようです:

olp$ tree
.
├── bin
│   ├── easy_install
│   ├── easy_install-2.7
│   ├── python
│   ├── python2 -> python
│   └── python2.7 -> python
├── include
│   └── python2.7 -> /usr/include/python2.7
├── lib
│   └── python2.7
│       ├── _abcoll.py -> /usr/lib/python2.7/_abcoll.py
│       ├── _abcoll.pyc
│       ├── abc.py -> /usr/lib/python2.7/abc.py
│       ├── abc.pyc
│       ├── codecs.py -> /usr/lib/python2.7/codecs.py
│       ├── codecs.pyc
│       ├── config -> /usr/lib/python2.7/config
│       ├── copy_reg.py -> /usr/lib/python2.7/copy_reg.py
│       ├── copy_reg.pyc
│       ├── distutils
│       │   ├── distutils.cfg
│       │   ├── __init__.py
│       │   └── __init__.pyc
│       ├── encodings -> /usr/lib/python2.7/encodings
│       ├── fnmatch.py -> /usr/lib/python2.7/fnmatch.py
│       ├── fnmatch.pyc
│       ├── genericpath.py -> /usr/lib/python2.7/genericpath.py
│       ├── genericpath.pyc
│       ├── lib-dynload -> /usr/lib/python2.7/lib-dynload
│       ├── linecache.py -> /usr/lib/python2.7/linecache.py
│       ├── linecache.pyc
│       ├── locale.py -> /usr/lib/python2.7/locale.py
│       ├── no-global-site-packages.txt
│       ├── ntpath.py -> /usr/lib/python2.7/ntpath.py
│       ├── orig-prefix.txt
│       ├── os.py -> /usr/lib/python2.7/os.py
│       ├── os.pyc
│       ├── posixpath.py -> /usr/lib/python2.7/posixpath.py
│       ├── posixpath.pyc
│       ├── re.py -> /usr/lib/python2.7/re.py
│       ├── re.pyc
│       ├── site-packages
│       │   ├── easy-install.pth
│       │   ├── setuptools-0.6c11-py2.7.egg
│       │   └── setuptools.pth
│       ├── site.py
│       ├── site.pyc
│       ├── sre_compile.py -> /usr/lib/python2.7/sre_compile.py
│       ├── sre_compile.pyc
│       ├── sre_constants.py -> /usr/lib/python2.7/sre_constants.py
│       ├── sre_constants.pyc
│       ├── sre_parse.py -> /usr/lib/python2.7/sre_parse.py
│       ├── sre_parse.pyc
│       ├── sre.py -> /usr/lib/python2.7/sre.py
│       ├── stat.py -> /usr/lib/python2.7/stat.py
│       ├── stat.pyc
│       ├── types.py -> /usr/lib/python2.7/types.py
│       ├── types.pyc
│       ├── UserDict.py -> /usr/lib/python2.7/UserDict.py
│       ├── UserDict.pyc
│       ├── warnings.py -> /usr/lib/python2.7/warnings.py
│       ├── warnings.pyc
│       ├── _weakrefset.py -> /usr/lib/python2.7/_weakrefset.py
│       └── _weakrefset.pyc
└── local
    ├── bin -> /home/tom/Documents/Dev/olp/bin
    ├── include -> /home/tom/Documents/Dev/olp/include
    └── lib -> /home/tom/Documents/Dev/olp/lib

誰でもエラーを手伝ってもらえますか? 私は何を間違えましたか?

4

1 に答える 1

1

問題が何であるかを見つけました。virtualenv を開始したときにフォルダー内にいなかったようで、別のインストールの上に pip をインストールしようとしていて、混乱していました....

于 2013-04-03T19:49:42.523 に答える