pythonencodingcp1252

Python TypeError: encoding with 'cp1252' codec failed


I get this error when I run any installation command:

Complete output from command python setup.py egg_info:
    TypeError: 'tuple' object is not callable

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\TOSHIB~1\AppData\Local\Temp\pip-req-build-hztbm9lf\setup.py", line 13, in <module>
        include_dirs=[numpy.get_include()])]
      File "c:\python34\lib\site-packages\setuptools\__init__.py", line 129, in setup
        return distutils.core.setup(**attrs)
      File "c:\python34\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "c:\python34\lib\distutils\dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "c:\python34\lib\distutils\dist.py", line 971, in run_command
        log.info("running %s", command)
      File "c:\python34\lib\distutils\log.py", line 44, in info
        self._log(INFO, msg, args)
      File "c:\python34\lib\distutils\log.py", line 33, in _log
        msg = msg.encode(encoding, "backslashreplace").decode(encoding)
    TypeError: encoding with 'cp1252' codec failed (TypeError: 'tuple' object is not callable)

The installation command in this case is

pip install git+https://github.com/coreylynch/pyFM

What am I doing wrong?

I am on python 3.4.2, on pip 10.0.1 and on Windows 10.

Thanks in advance.


Solution

  • You can download the wheel package of pyfm from https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyfm

    Just run the wheel package as python install .whl let me know the result