PubNub: TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

Question:

When I tried to install PubNub with pip, then I got TypeError: pip install pubnub

Traceback:

     Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:UsersphuonAppDataLocalTemppip-install-oti79hk0cbor2setup.py", line 52, in <module>
        **kwargs
      File "c:usersphuonappdatalocalprogramspythonpython37Libdistutilsdist.py", line 985, in run_command
        cmd_obj.run()
      File "c:usersphuonappdatalocalprogramspythonpython37Libdistutilscommandbuild.py", line 135, in run
        self.run_command(cmd_name)
      File "c:usersphuonappdatalocalprogramspythonpython37Libdistutilscmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "c:usersphuonappdatalocalprogramspythonpython37Libdistutilsdist.py", line 985, in run_command
        cmd_obj.run()
      File "c:usersphuonenvsecommercelibsite-packagessetuptoolscommandbuild_ext.py", line 84, in run
        _build_ext.run(self)
      File "c:usersphuonappdatalocalprogramspythonpython37Libdistutils_msvccompiler.py", line 238, in initialize
        vc_env = _get_vc_env(plat_spec)
      File "c:usersphuonenvsecommercelibsite-packagessetuptoolsmsvc.py", line 171, in msvc14_get_vc_env
        return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()
      File "c:usersphuonenvsecommercelibsite-packagessetuptoolsmsvc.py", line 1620, in return_env
        if self.vs_ver >= 14 and isfile(self.VCRuntimeRedist):
      File "c:usersphuonenvsecommercelibgenericpath.py", line 30, in isfile
        st = os.stat(path)
    TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:usersphuonenvsecommercescriptspython.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\phuon\AppData\Local\Temp\pip-install-oti79hk0\cbor2\setup.py'"'"'; __file__='"'"'C:\Users\phuon\AppData\Local\Temp\pip-install-oti79hk0\cbor2\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersphuonAppDataLocalTemppip-record-2pmjwbm8install-record.txt' --single-version-externally-managed --compile --install-headers 
'c:usersphuonenvsecommerceincludesitepython3.7cbor2' Check the logs for full command output.

Thanks for any answer

Asked By: NPL

||

Answers:

It worked when I use PubNub version <= 4.1.7

pip install pubnub==4.1.7
Answered By: NPL
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.