box-python-sdk icon indicating copy to clipboard operation
box-python-sdk copied to clipboard

Issue installing boxsdk using "pip install boxsdk"

Open nraizada opened this issue 4 years ago • 4 comments

Hi Team,

I am trying to install boxsdk python library on my Windows machine. But it keeps failing with the below error.

Can you please help fixing this?

C:\Users\dummy_user>pip install boxsdk Collecting boxsdk Using cached boxsdk-2.11.0-py2.py3-none-any.whl (128 kB) Requirement already satisfied: requests>=2.4.3 in c:\users\dummy_user\appdata\local\programs\python\python38\lib\site-packages (from boxsdk) (2.25.1) Collecting requests-toolbelt<1.0.0,>=0.4.0 Using cached requests_toolbelt-0.9.1-py2.py3-none-any.whl (54 kB) Requirement already satisfied: six>=1.9.0 in c:\users\dummy_user\appdata\local\programs\python\python38\lib\site-packages (from boxsdk) (1.15.0) Collecting wrapt>=1.10.1 Using cached wrapt-1.12.1.tar.gz (27 kB) Collecting attrs>=17.3.0 Using cached attrs-20.3.0-py2.py3-none-any.whl (49 kB) Requirement already satisfied: idna<3,>=2.5 in c:\users\dummy_user\appdata\local\programs\python\python38\lib\site-packages (from requests>=2.4.3->boxsdk) (2.10) Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\dummy_user\appdata\local\programs\python\python38\lib\site-packages (from requests>=2.4.3->boxsdk) (1.26.4) Requirement already satisfied: certifi>=2017.4.17 in c:\users\dummy_user\appdata\local\programs\python\python38\lib\site-packages (from requests>=2.4.3->boxsdk) (2020.12.5) Requirement already satisfied: chardet<5,>=3.0.2 in c:\users\dummy_user\appdata\local\programs\python\python38\lib\site-packages (from requests>=2.4.3->boxsdk) (3.0.4) Using legacy 'setup.py install' for wrapt, since package 'wheel' is not installed. Installing collected packages: wrapt, requests-toolbelt, attrs, boxsdk Running setup.py install for wrapt ... error ERROR: Command errored out with exit status 1: command: 'c:\users\dummy_user\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\dummy_user\AppData\Local\Temp\pip-install-79d9bhkm\wrapt_91b058ee6a5045ecb718ec073e750485\setup.py'"'"'; file='"'"'C:\Users\dummy_user\AppData\Local\Temp\pip-install-79d9bhkm\wrapt_91b058ee6a5045ecb718ec073e750485\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\dummy_user\AppData\Local\Temp\pip-record-daj0rxi7\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\dummy_user\appdata\local\programs\python\python38\Include\wrapt' cwd: C:\Users\dummy_user\AppData\Local\Temp\pip-install-79d9bhkm\wrapt_91b058ee6a5045ecb718ec073e750485 Complete output (77 lines): running install running build running build_py creating build creating build\lib.win-amd64-3.8 creating build\lib.win-amd64-3.8\wrapt copying src\wrapt\decorators.py -> build\lib.win-amd64-3.8\wrapt copying src\wrapt\importer.py -> build\lib.win-amd64-3.8\wrapt copying src\wrapt\wrappers.py -> build\lib.win-amd64-3.8\wrapt copying src\wrapt_init_.py -> build\lib.win-amd64-3.8\wrapt running build_ext building 'wrapt._wrappers' extension Traceback (most recent call last): File "", line 1, in File "C:\Users\dummy_user\AppData\Local\Temp\pip-install-79d9bhkm\wrapt_91b058ee6a5045ecb718ec073e750485\setup.py", line 102, in run_setup(with_extensions=True) File "C:\Users\dummy_user\AppData\Local\Temp\pip-install-79d9bhkm\wrapt_91b058ee6a5045ecb718ec073e750485\setup.py", line 72, in run_setup setup(**setup_kwargs_tmp) File "c:\users\dummy_user\appdata\local\programs\python\python38\lib\distutils\core.py", line 148, in setup dist.run_commands() File "c:\users\dummy_user\appdata\local\programs\python\python38\lib\distutils\dist.py", line 966, in run_commands self.run_command(cmd) File "c:\users\dummy_user\appdata\local\programs\python\python38\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "c:\users\dummy_user\appdata\local\programs\python\python38\lib\site-packages\setuptools\command\install.py", line 61, in run return orig.install.run(self) File "c:\users\dummy_user\appdata\local\programs\python\python38\lib\distutils\command\install.py", line 545, in run self.run_command('build') File "c:\users\dummy_user\appdata\local\programs\python\python38\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "c:\users\dummy_user\appdata\local\programs\python\python38\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "c:\users\dummy_user\appdata\local\programs\python\python38\lib\distutils\command\build.py", line 135, in run self.run_command(cmd_name) File "c:\users\dummy_user\appdata\local\programs\python\python38\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "c:\users\dummy_user\appdata\local\programs\python\python38\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\dummy_user\AppData\Local\Temp\pip-install-79d9bhkm\wrapt_91b058ee6a5045ecb718ec073e750485\setup.py", line 25, in run build_ext.run(self) File "c:\users\dummy_user\appdata\local\programs\python\python38\lib\distutils\command\build_ext.py", line 340, in run self.build_extensions() File "c:\users\dummy_user\appdata\local\programs\python\python38\lib\distutils\command\build_ext.py", line 449, in build_extensions self._build_extensions_serial() File "c:\users\dummy_user\appdata\local\programs\python\python38\lib\distutils\command\build_ext.py", line 474, in _build_extensions_serial self.build_extension(ext) File "C:\Users\dummy_user\AppData\Local\Temp\pip-install-79d9bhkm\wrapt_91b058ee6a5045ecb718ec073e750485\setup.py", line 31, in build_extension build_ext.build_extension(self, ext) File "c:\users\dummy_user\appdata\local\programs\python\python38\lib\distutils\command\build_ext.py", line 528, in build_extension objects = self.compiler.compile(sources, File "c:\users\dummy_user\appdata\local\programs\python\python38\lib\distutils_msvccompiler.py", line 327, in compile self.initialize() File "c:\users\dummy_user\appdata\local\programs\python\python38\lib\distutils_msvccompiler.py", line 224, in initialize vc_env = _get_vc_env(plat_spec) File "c:\users\dummy_user\appdata\local\programs\python\python38\lib\site-packages\setuptools\msvc.py", line 314, in msvc14_get_vc_env return _msvc14_get_vc_env(plat_spec) File "c:\users\dummy_user\appdata\local\programs\python\python38\lib\site-packages\setuptools\msvc.py", line 266, in _msvc14_get_vc_env vcvarsall, vcruntime = _msvc14_find_vcvarsall(plat_spec) File "c:\users\dummy_user\appdata\local\programs\python\python38\lib\site-packages\setuptools\msvc.py", line 221, in _msvc14_find_vcvarsall _, best_dir = msvc14_find_vc2017() File "c:\users\dummy_user\appdata\local\programs\python\python38\lib\site-packages\setuptools\msvc.py", line 193, in msvc14_find_vc2017 path = subprocess.check_output([ File "c:\users\dummy_user\appdata\local\programs\python\python38\lib\subprocess.py", line 415, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "c:\users\dummy_user\appdata\local\programs\python\python38\lib\site-packages\run_init.py", line 145, in new process = cls.create_process(command, stdin, cwd=cwd, env=env, shell=shell) File "c:\users\dummy_user\appdata\local\programs\python\python38\lib\site-packages\run_init.py", line 121, in create_process shlex.split(command), File "c:\users\dummy_user\appdata\local\programs\python\python38\lib\shlex.py", line 311, in split return list(lex) File "c:\users\dummy_user\appdata\local\programs\python\python38\lib\shlex.py", line 300, in next token = self.get_token() File "c:\users\dummy_user\appdata\local\programs\python\python38\lib\shlex.py", line 109, in get_token raw = self.read_token() File "c:\users\dummy_user\appdata\local\programs\python\python38\lib\shlex.py", line 140, in read_token nextchar = self.instream.read(1) AttributeError: 'list' object has no attribute 'read'

ERROR: Command errored out with exit status 1: 'c:\users\dummy_user\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\dummy_user\AppData\Local\Temp\pip-install-79d9bhkm\wrapt_91b058ee6a5045ecb718ec073e750485\setup.py'"'"'; file='"'"'C:\Users\dummy_user\AppData\Local\Temp\pip-install-79d9bhkm\wrapt_91b058ee6a5045ecb718ec073e750485\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\dummy_user\AppData\Local\Temp\pip-record-daj0rxi7\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\dummy_user\appdata\local\programs\python\python38\Include\wrapt' Check the logs for full command output.

nraizada avatar Apr 16 '21 19:04 nraizada

Hi @nraizada,

Thanks for submitting this issue. This may be a python versioning problem. Are you using python 3.8? We currently support up to python 3.7. Can you try to install using python 3.7?

@swfree

swfree avatar Apr 19 '21 17:04 swfree

Hi Swfree,

I was having issues with 3.7 also and hence upgraded to 3.8. but result and error is same

nraizada avatar Apr 19 '21 17:04 nraizada

Hi @nraizada,

Sorry to hear that the install doesn't work with either version. From your error logs, it looks like the install is getting stuck on the cached wrapt install. You could take a look at the commands in these github issues below to see if any of those commands might solve the install issue: https://github.com/GrahamDumpleton/wrapt/issues/171 https://github.com/GrahamDumpleton/wrapt/issues/156

@swfree

swfree avatar Apr 19 '21 19:04 swfree

Hi,

Both of those links are not helping me. tried all the suggestions but nothing is working.

Please help.

Regards, Nitin

nraizada avatar Apr 30 '21 16:04 nraizada

This issue has been automatically marked as stale because it has not been updated in the last 30 days. It will be closed if no further activity occurs within the next 7 days. Feel free to reach out or mention Box SDK team member for further help and resources if they are needed.

stale[bot] avatar Dec 19 '22 20:12 stale[bot]

This issue has been automatically closed due to maximum period of being stale. Thank you for your contribution to Box Python SDK and feel free to open another PR/issue at any time.

stale[bot] avatar Dec 27 '22 06:12 stale[bot]