atlassian-python-api icon indicating copy to clipboard operation
atlassian-python-api copied to clipboard

pip install fails on Python 3.9 for version 3.17.0 (and also 3.15.0) on Debian 11

Open ZonderP opened this issue 3 years ago • 8 comments

Works though on Python 3.7. 3.14.1 installation worked flawlessly on Python 3.7 (on Debian 10) and Python 3.9 (on Debian 11).

06:00:07 Collecting atlassian-python-api 06:00:07 Downloading atlassian-python-api-3.15.0.tar.gz (126 kB) 06:00:07 Installing build dependencies: started 06:00:09 Installing build dependencies: finished with status 'done' 06:00:09 Getting requirements to build wheel: started 06:00:09 Getting requirements to build wheel: finished with status 'done' 06:00:09 Preparing wheel metadata: started 06:00:09 Preparing wheel metadata: finished with status 'done' ... 06:00:10 Collecting requests-oauthlib 06:00:10 Using cached requests_oauthlib-1.3.0-py2.py3-none-any.whl (23 kB) 06:00:10 Requirement already satisfied: six in /usr/lib/python3/dist-packages (from atlassian-python-api) (1.16.0) 06:00:10 Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from atlassian-python-api) (2.25.1) ... 06:00:10 Building wheels for collected packages: atlassian-python-api 06:00:10 Building wheel for atlassian-python-api (PEP 517): started 06:00:11 Building wheel for atlassian-python-api (PEP 517): finished with status 'error' 06:00:11 ERROR: Command errored out with exit status 1: 06:00:11 command: /home/****/jenkins/jenkins/workspace/xyz/zyx/.venv/bin/python3 /tmp/tmpdsprt62t_in_process.py build_wheel /tmp/tmpnzy4xwf1 06:00:11 cwd: /tmp/pip-install-3yw1xjq6/atlassian-python-api_650071cfaba74a119032944640233177 06:00:11 Complete output (112 lines): 06:00:11 running bdist_wheel 06:00:11 running build 06:00:11 running build_py 06:00:11 creating build 06:00:11 creating build/lib 06:00:11 creating build/lib/tests 06:00:11 copying tests/test_servicedesk.py -> build/lib/tests 06:00:11 copying tests/test_bitbucket_cloud_oo.py -> build/lib/tests 06:00:11 copying tests/test_bitbucket_server.py -> build/lib/tests 06:00:11 copying tests/test_base.py -> build/lib/tests 06:00:11 copying tests/test_confluence_advanced_mode.py -> build/lib/tests 06:00:11 copying tests/test_bitbucket_server_oo.py -> build/lib/tests 06:00:11 copying tests/init.py -> build/lib/tests 06:00:11 copying tests/mockup.py -> build/lib/tests 06:00:11 copying tests/test_confluence_attach.py -> build/lib/tests 06:00:11 creating build/lib/atlassian 06:00:11 copying atlassian/utils.py -> build/lib/atlassian 06:00:11 copying atlassian/service_desk.py -> build/lib/atlassian 06:00:11 copying atlassian/jira.py -> build/lib/atlassian 06:00:11 copying atlassian/rest_client.py -> build/lib/atlassian 06:00:11 copying atlassian/request_utils.py -> build/lib/atlassian 06:00:11 copying atlassian/bamboo.py -> build/lib/atlassian 06:00:11 copying atlassian/errors.py -> build/lib/atlassian 06:00:11 copying atlassian/xray.py -> build/lib/atlassian 06:00:11 copying atlassian/portfolio.py -> build/lib/atlassian 06:00:11 copying atlassian/crowd.py -> build/lib/atlassian 06:00:11 copying atlassian/init.py -> build/lib/atlassian 06:00:11 copying atlassian/marketplace.py -> build/lib/atlassian 06:00:11 copying atlassian/confluence.py -> build/lib/atlassian 06:00:11 creating build/lib/atlassian/bitbucket 06:00:11 copying atlassian/bitbucket/base.py -> build/lib/atlassian/bitbucket 06:00:11 copying atlassian/bitbucket/init.py -> build/lib/atlassian/bitbucket 06:00:11 creating build/lib/atlassian/bitbucket/server 06:00:11 copying atlassian/bitbucket/server/base.py -> build/lib/atlassian/bitbucket/server 06:00:11 copying atlassian/bitbucket/server/init.py -> build/lib/atlassian/bitbucket/server 06:00:11 copying atlassian/bitbucket/server/globalPermissions.py -> build/lib/atlassian/bitbucket/server 06:00:11 creating build/lib/atlassian/bitbucket/cloud 06:00:11 copying atlassian/bitbucket/cloud/base.py -> build/lib/atlassian/bitbucket/cloud 06:00:11 copying atlassian/bitbucket/cloud/init.py -> build/lib/atlassian/bitbucket/cloud 06:00:11 creating build/lib/atlassian/bitbucket/server/common 06:00:11 copying atlassian/bitbucket/server/common/permissions.py -> build/lib/atlassian/bitbucket/server/common 06:00:11 copying atlassian/bitbucket/server/common/init.py -> build/lib/atlassian/bitbucket/server/common 06:00:11 creating build/lib/atlassian/bitbucket/server/projects 06:00:11 copying atlassian/bitbucket/server/projects/init.py -> build/lib/atlassian/bitbucket/server/projects 06:00:11 creating build/lib/atlassian/bitbucket/server/projects/repos 06:00:11 copying atlassian/bitbucket/server/projects/repos/init.py -> build/lib/atlassian/bitbucket/server/projects/repos 06:00:11 creating build/lib/atlassian/bitbucket/cloud/workspaces 06:00:11 copying atlassian/bitbucket/cloud/workspaces/projects.py -> build/lib/atlassian/bitbucket/cloud/workspaces 06:00:11 copying atlassian/bitbucket/cloud/workspaces/init.py -> build/lib/atlassian/bitbucket/cloud/workspaces 06:00:11 creating build/lib/atlassian/bitbucket/cloud/common 06:00:11 copying atlassian/bitbucket/cloud/common/users.py -> build/lib/atlassian/bitbucket/cloud/common 06:00:11 copying atlassian/bitbucket/cloud/common/init.py -> build/lib/atlassian/bitbucket/cloud/common 06:00:11 creating build/lib/atlassian/bitbucket/cloud/repositories 06:00:11 copying atlassian/bitbucket/cloud/repositories/defaultReviewers.py -> build/lib/atlassian/bitbucket/cloud/repositories 06:00:11 copying atlassian/bitbucket/cloud/repositories/branchRestrictions.py -> build/lib/atlassian/bitbucket/cloud/repositories 06:00:11 copying atlassian/bitbucket/cloud/repositories/issues.py -> build/lib/atlassian/bitbucket/cloud/repositories 06:00:11 copying atlassian/bitbucket/cloud/repositories/pullRequests.py -> build/lib/atlassian/bitbucket/cloud/repositories 06:00:11 copying atlassian/bitbucket/cloud/repositories/pipelines.py -> build/lib/atlassian/bitbucket/cloud/repositories 06:00:11 copying atlassian/bitbucket/cloud/repositories/init.py -> build/lib/atlassian/bitbucket/cloud/repositories 06:00:11 running egg_info 06:00:11 writing manifest file 'atlassian_python_api.egg-info/SOURCES.txt' 06:00:11 copying atlassian/VERSION -> build/lib/atlassian 06:00:11 running install 06:00:11 running install_lib 06:00:11 Traceback (most recent call last): 06:00:11 File "/tmp/tmpdsprt62t_in_process.py", line 280, in 06:00:11 main() 06:00:11 File "/tmp/tmpdsprt62t_in_process.py", line 263, in main 06:00:11 json_out['return_val'] = hook(**hook_input['kwargs']) 06:00:11 File "/tmp/tmpdsprt62t_in_process.py", line 204, in build_wheel 06:00:11 return _build_backend().build_wheel(wheel_directory, config_settings, 06:00:11 File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 216, in build_wheel 06:00:11 return self._build_with_temp_dir(['bdist_wheel'], '.whl', 06:00:11 File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 202, in _build_with_temp_dir 06:00:11 self.run_setup() 06:00:11 File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 253, in run_setup 06:00:11 super(_BuildMetaLegacyBackend, 06:00:11 File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 145, in run_setup 06:00:11 exec(compile(code, file, 'exec'), locals()) 06:00:11 File "setup.py", line 11, in 06:00:11 setup( 06:00:11 File "/usr/lib/python3/dist-packages/setuptools/init.py", line 153, in setup 06:00:11 return distutils.core.setup(**attrs) 06:00:11 File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 148, in setup 06:00:11 dist.run_commands() 06:00:11 File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 967, in run_commands 06:00:11 self.run_command(cmd) 06:00:11 File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 986, in run_command 06:00:11 cmd_obj.run() 06:00:11 File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 259, in run 06:00:11 self.run_command('install') 06:00:11 File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 313, in run_command 06:00:11 self.distribution.run_command(command) 06:00:11 File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 986, in run_command 06:00:11 cmd_obj.run() 06:00:11 File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 61, in run 06:00:11 return orig.install.run(self) 06:00:11 File "/usr/lib/python3/dist-packages/setuptools/_distutils/command/install.py", line 578, in run 06:00:11 self.run_command(cmd_name) 06:00:11 File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 313, in run_command 06:00:11 self.distribution.run_command(command) 06:00:11 File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 985, in run_command 06:00:11 cmd_obj.ensure_finalized() 06:00:11 File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 107, in ensure_finalized 06:00:11 self.finalize_options() 06:00:11 File "/usr/lib/python3/dist-packages/setuptools/command/install_lib.py", line 17, in finalize_options 06:00:11 self.set_undefined_options('install',('install_layout','install_layout')) 06:00:11 File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 290, in set_undefined_options 06:00:11 setattr(self, dst_option, getattr(src_cmd_obj, src_option)) 06:00:11 File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 103, in getattr 06:00:11 raise AttributeError(attr) 06:00:11 AttributeError: install_layout 06:00:11 ---------------------------------------- 06:00:11 ERROR: Failed building wheel for atlassian-python-api 06:00:11 Failed to build atlassian-python-api 06:00:11 ERROR: Could not build wheels for atlassian-python-api which use PEP 517 and cannot be installed directly

ZonderP avatar Jan 03 '22 13:01 ZonderP

Did you try install through link: pipe install atlassian-python-api

gonchik avatar Jan 04 '22 11:01 gonchik

Yes, sorry, I forgot to mention: I use 'pip install atlassian-python-api'. To overcome the issue I now use 'pip install atlassian-python-api==3.14.1'.

ZonderP avatar Jan 04 '22 13:01 ZonderP

@ZonderP Did you check on another env? I can't reproduce it

gonchik avatar Jan 06 '22 19:01 gonchik

@gonchik Thanks for looking into this issue. Okay, I tried now on the Debian 11 machine with Python 3.9 in new virtual envs. The first venv I created I did so using 'python3 -m venv .venv --system-site-packages' which is exactly what I did in the project where I have the reported issue. -> 'pip install atlassian-python-api' fails with the error described. But: All went good when I created another venv on that machine via 'python3 -m venv .venv2'. -> 'pip install atlassian-python-api' worked without any issues in this case. So most probably the issue has something to do with other packages which I pulled into my .venv using '--system-site-packages'. I'm quite new to Linux, but in case you're still interested in what could be the reason for my issue, I'll try my best to help you if you can give me some hints what to inspect how.

ZonderP avatar Jan 07 '22 09:01 ZonderP

Oh my! I've no clue what's going on... I thought it might be a good idea to show you here the output of 'pip list' from '.venv' which is the virtual env I created for the testing in my previous comment - the one where 'pip install atlassian-python-api' failed. Thus I switched backed from '.venv2' (which was the virtual env where atlassian-python-api installation worked) to '.venv'. I did so via 'deactivate' while in '.venv2' and then did a 'source .venv/bin/activate'. And just to be sure that I'm really in the virtual env where atlassian-python-api installation doesn't work, I called 'pip install atlassian-python-api' again (I expected to get the error again, for sure!) - But this time even in this virtual environment it worked without a problem... I guess this might have something to do with the fact that I successfully could install atlassian-python-api 3.17.0 in '.venv2' before, but on the other hand I now completely lost trust in the usefulness of virtual environments. I swear, I didn't to anything else in between the steps I described. Forgive me, if I sound like a Linux novice - I am :-)

ZonderP avatar Jan 07 '22 13:01 ZonderP

@ZonderP is this actual ?

gonchik avatar Jan 25 '22 18:01 gonchik

For me not anymore... I use now 'pip install atlassian-python-api==3.14.1'. Which solved the issue for me, because I don't need a newer version. If no one else reported something similar and you aren't too much interested what went wrong, just close this issue. It's fine for me. (I couldn't give any more details anyway)

ZonderP avatar Jan 26 '22 14:01 ZonderP

@gonchik This is fixed by #934.

Spacetown avatar Jan 30 '22 16:01 Spacetown

Awesome! :)

gonchik avatar Sep 11 '22 13:09 gonchik

Great, thanks @gonchik ! I can now also use latest version in my project with this fix applied.

ZonderP avatar Apr 26 '24 09:04 ZonderP