python - sys_platform is not defined x64 Windows -
this has been bugging me little while. upgraded x64 python, , started getting error (example pip install).
c:\users\<uname>\distribute-0.6.35>pip install python-qt collecting python-qt downloading python-qt-0.50.tar.gz building wheels collected packages: python-qt running setup.py bdist_wheel python-qt complete output command c:\python27\python.exe -c "import setuptools;__file__='c:\\users\\<uname>\\appdata\\local\\t emp\\pip-build-vonat7\\python-qt\\setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bd ist_wheel -d c:\users\<uname>\appdata\local\temp\tmpghy5gtpip-wheel-: traceback (most recent call last): file "<string>", line 1, in <module> file "c:\users\<uname>\appdata\local\temp\pip-build-vonat7\python-qt\setup.py", line 11, in <module> packages=['qt'], file "c:\python27\lib\distutils\core.py", line 137, in setup ok = dist.parse_command_line() file "c:\python27\lib\site-packages\distribute-0.6.35-py2.7.egg\setuptools\dist.py", line 232, in parse_command_line result = _distribution.parse_command_line(self) file "c:\python27\lib\distutils\dist.py", line 467, in parse_command_line args = self._parse_command_opts(parser, args) file "c:\python27\lib\site-packages\distribute-0.6.35-py2.7.egg\setuptools\dist.py", line 558, in _parse_command_opts nargs = _distribution._parse_command_opts(self, parser, args) file "c:\python27\lib\distutils\dist.py", line 523, in _parse_command_opts cmd_class = self.get_command_class(command) file "c:\python27\lib\site-packages\distribute-0.6.35-py2.7.egg\setuptools\dist.py", line 362, in get_command_class ep.require(installer=self.fetch_build_egg) file "c:\python27\lib\site-packages\distribute-0.6.35-py2.7.egg\pkg_resources.py", line 2027, in require working_set.resolve(self.dist.requires(self.extras),env,installer)) file "c:\python27\lib\site-packages\distribute-0.6.35-py2.7.egg\pkg_resources.py", line 2237, in requires dm = self._dep_map file "c:\python27\lib\site-packages\distribute-0.6.35-py2.7.egg\pkg_resources.py", line 2466, in _dep_map self.__dep_map = self._compute_dependencies() file "c:\python27\lib\site-packages\distribute-0.6.35-py2.7.egg\pkg_resources.py", line 2499, in _compute_dependencies common = frozenset(reqs_for_extra(none)) file "c:\python27\lib\site-packages\distribute-0.6.35-py2.7.egg\pkg_resources.py", line 2496, in reqs_for_extra if req.marker_fn(override={'extra':extra}): file "c:\python27\lib\site-packages\distribute-0.6.35-py2.7.egg\_markerlib\markers.py", line 109, in marker_fn return eval(compiled_marker, environment) file "<environment marker>", line 1, in <module> nameerror: name 'sys_platform' not defined ---------------------------------------- failed building wheel python-qt failed build python-qt installing collected packages: python-qt running setup.py install python-qt installed python-qt-0.50
the package installed fine, cannot build wheels. tried re-installing distribute manually downloading zip , running python setup.py install
. installed wonderfuly, without hitch. still have above problem.
how can re-define sys_platform?
alright, rolled x86 ole 32 bit python, , still have problem. concerning, because cannot reset after re-installing. looked @ markerlib, looks promising, don't know how use safely. unable install pretty anything pypi, giving points increase interest.
any help? want able use pypi again.
i chose selected answer most likely solve problem. myself have moved x86 python, cannot test myself. therefore, encourage future visitors try answer, have not myself been able test it.
- might bug. check out: https://bugs.python.org/
- you can manually check markers.py file , try fix it. think there reference
sys_platform
has changedsys.platform
regarding markerlib, can try out-
import markerlib marker = markerlib.compile("sys.platform == 'win32'") marker(environment=markerlib.default_environment(), override={'sys.platform':'win32'})
Comments
Post a Comment