ImportError:尝试通过pip

时间:2016-07-28 14:41:53

标签: python django heroku pip

有人遇到过同样的问题吗?我试图从SO运行解决方案:

pip install --upgrade distribute

pip install --upgrade setuptools

每次都得到相同的结果:

Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-JC9mq_/distribute/setup.py", line 58, in <module>
        setuptools.setup(**setup_params)
      File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
        dist.run_commands()
      File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "setuptools/command/egg_info.py", line 177, in run
        writer = ep.load(installer=installer)
      File "pkg_resources.py", line 2241, in load
        if require: self.require(env, installer)
      File "pkg_resources.py", line 2254, in require
        working_set.resolve(self.dist.requires(self.extras),env,installer)))
      File "pkg_resources.py", line 2471, in requires
        dm = self._dep_map
      File "pkg_resources.py", line 2682, in _dep_map
        self.__dep_map = self._compute_dependencies()
      File "pkg_resources.py", line 2699, in _compute_dependencies
        from _markerlib import compile as compile_marker
    ImportError: No module named _markerlib

python 2.7,pip 8.1.2

[编辑] 创建新环境的解决方案。使用virtualenv myenv --distribute为本地环境工作,但当我尝试推送到heroku时,它给出了完全相同的错误:没有名为_markerlib的模块。所以,问题不只是在本地环境中。

1 个答案:

答案 0 :(得分:0)

我认为,我这样修好了。

pip install %HOME%\Downloads\wheel-0.25.0.tar.gz
pip install  Distribute

运行它,然后

pip install django-validated-file

我这样做了,这样就可以了

%windir%\system32\bash.exe -cur_console:p