gpt4 book ai didi

python - PubNub:TypeError:stat:路径应该是字符串、字节、os.PathLike 或整数,而不是 NoneType

转载 作者:行者123 更新时间:2023-12-01 06:28:52 25 4
gpt4 key购买 nike

当我尝试使用 pip 安装 PubNub 时,出现 TypeError: pip install pubnub

回溯:

     Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\phuon\AppData\Local\Temp\pip-install-oti79hk0\cbor2\setup.py", line 52, in <module>
**kwargs
File "c:\users\phuon\appdata\local\programs\python\python37\Lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\phuon\appdata\local\programs\python\python37\Lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\phuon\appdata\local\programs\python\python37\Lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\phuon\appdata\local\programs\python\python37\Lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\phuon\envs\ecommerce\lib\site-packages\setuptools\command\build_ext.py", line 84, in run
_build_ext.run(self)
File "c:\users\phuon\appdata\local\programs\python\python37\Lib\distutils\_msvccompiler.py", line 238, in initialize
vc_env = _get_vc_env(plat_spec)
File "c:\users\phuon\envs\ecommerce\lib\site-packages\setuptools\msvc.py", line 171, in msvc14_get_vc_env
return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()
File "c:\users\phuon\envs\ecommerce\lib\site-packages\setuptools\msvc.py", line 1620, in return_env
if self.vs_ver >= 14 and isfile(self.VCRuntimeRedist):
File "c:\users\phuon\envs\ecommerce\lib\genericpath.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:\users\phuon\envs\ecommerce\scripts\python.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('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\phuon\AppData\Local\Temp\pip-record-2pmjwbm8\install-record.txt' --single-version-externally-managed --compile --install-headers
'c:\users\phuon\envs\ecommerce\include\site\python3.7\cbor2' Check the logs for full command output.

感谢您的回答

最佳答案

当我使用 PubNub 版本 <= 4.1.7 时它有效

pip install pubnub==4.1.7

关于python - PubNub:TypeError:stat:路径应该是字符串、字节、os.PathLike 或整数,而不是 NoneType,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59997926/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com