1

Pythonバージョン2.7.6でUbuntu 14.04を使用しています。最近、Python バージョン 3.4.2 を、システム Python を使用してサイド バイ サイドでインストールしましたpyenv。ここで、Python 3 用のいくつかのデバッガーをテストしたいと思います。python3-trepan プロジェクト ページtrepan-0.2.8-py3.3.eggからダウンロードしました。

次に、 and を実行するpyenv global 3.4.2easy_install trepan-0.2.8-py3.3.egg、次のエラーが表示されました。

Traceback (most recent call last):
  File "/home/hakon/.pyenv/versions/3.4.2/bin/easy_install", line 11, in <module>
    sys.exit(main())
  File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 1909, in main
    with_ei_usage(lambda:
  File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 1896, in with_ei_usage
    return f()
  File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 1913, in <lambda>
    distclass=DistributionWithoutHelpCommands, **kw
  File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 358, in run
    self.easy_install(spec, not self.no_deps)
  File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 574, in easy_install
    return self.install_item(None, spec, tmpdir, deps, True)
  File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 625, in install_item
    self.process_distribution(spec, dist, deps)
  File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 671, in process_distribution
    [requirement], self.local_index, self.easy_install
  File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/pkg_resources.py", line 564, in resolve
    dist = best[req.key] = env.best_match(req, self, installer)
  File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/pkg_resources.py", line 802, in best_match
    return self.obtain(req, installer) # try and download/install
  File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/pkg_resources.py", line 814, in obtain
    return installer(requirement)
  File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 593, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 623, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 809, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 1015, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 1000, in run_setup
    run_setup(setup_script, args)
  File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/sandbox.py", line 50, in run_setup
    lambda: execfile(
  File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/sandbox.py", line 100, in run
    return func()
  File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/sandbox.py", line 52, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'}
  File "/home/hakon/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/compat.py", line 78, in execfile
    exec(compile(source, fn, 'exec'), globs, locs)
  File "setup.py", line 12, in <module>
ImportError: No module named '__pkginfo__'

アップデート:

この問題は、を使用して Python 3 をインストールすることに関連していないようですpyenv: 次のことを試しました:

  • 無効pyenv
  • sudo apt-get install python3 python
  • sudo apt-get install python3-setuptools
  • sudo easy_install-3.4 trepan-0.2.8-py3.3.egg

これは私に同じエラーを与えました:

Traceback (most recent call last):
  File "/usr/bin/easy_install-3.4", line 9, in <module>
    load_entry_point('setuptools==3.3', 'console_scripts', 'easy_install-3.4')()
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1963, in main
    with_ei_usage(lambda:
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1950, in with_ei_usage
    return f()
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1967, in <lambda>
    distclass=DistributionWithoutHelpCommands, **kw
  File "/usr/lib/python3.4/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.4/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 381, in run
    self.easy_install(spec, not self.no_deps)
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 597, in easy_install
    return self.install_item(None, spec, tmpdir, deps, True)
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 648, in install_item
    self.process_distribution(spec, dist, deps)
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 694, in process_distribution
    [requirement], self.local_index, self.easy_install
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 620, in resolve
    dist = best[req.key] = env.best_match(req, ws, installer)
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 858, in best_match
    return self.obtain(req, installer) # try and download/install
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 870, in obtain
    return installer(requirement)
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 616, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 646, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 834, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1040, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1025, in run_setup
    run_setup(setup_script, args)
  File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 50, in run_setup
    lambda: execfile(
  File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 100, in run
    return func()
  File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 52, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'}
  File "/usr/lib/python3/dist-packages/setuptools/compat.py", line 78, in execfile
    exec(compile(source, fn, 'exec'), globs, locs)
  File "setup.py", line 12, in <module>
ImportError: No module named '__pkginfo__'
4

3 に答える 3

1

私はそれをテストしていませんが、メンテナー @rocky はこれをインストールすることを推奨しています:

pip3 install trepan3k

古い:

次のコマンドを使用してインストールします。

pip3 install -e git+https://github.com/rocky/python3-trepan/#egg=trepan

現在の tarball/eggs が壊れていると思います

于 2015-02-01T16:58:51.780 に答える
1

Trepan 0.4.2 (この記事の執筆時点では 0.4.7) から、pip の問題が解決されました。でも...

pyenv を使用していますが、それがない Ubuntu 14.04では、 pipの代わりにpip3を使用する必要がある場合があることに注意してください。pyenv の外では、デフォルトでpipが Python2 のpipに設定されていると思います。このリンクも参照してください。

そして悲しいかな、別の奇妙さがあります。wheel が利用できない場合 (バージョン 0.4.7 以前の場合のように)、pip は、egg ではなくソース tarball を使用してインストールします。ただし、Python 2 と Python 3 のソース コードは必然的に異なり、これらを 1 つのソースにまとめようとするのは非常に困難です。

それで、ホイール形式のファイルを pypi.org に置き始めました。これも将来このような問題に対処することを願っています。

于 2015-05-11T01:49:56.040 に答える