pyauth / python-pkcs11

PKCS#11/Cryptoki support for Python
MIT License
149 stars 71 forks source link

Error received when installing: 'TypeError: can only concatenate tuple (not "list") to tuple' #133

Closed joseavegaa closed 2 years ago

joseavegaa commented 2 years ago

When installing using pip install python-pkcs11 or pip install git+https://github.com/danni/python-pkcs11, I get the following error:

TypeError: can only concatenate tuple (not "list") to tuple

I've tried to install the package on two different computers. One of them running Windows 10 21H2 and the other one on Windows 11. Both of them have new conda environments created with miniforge and using Python 3.10.1 and pip 21.3.1. Also, Visual Code for C++ is installed and I am indeed able to compile and install other packages, such as PyHanko or Tesserocr.

MatthiasValvekens commented 2 years ago

Do you have a stack trace for that exception, or some kind of detailed error log? The error you got is a pretty generic one, so it's hard to say where the issue is without that information. I've never actually tried installing python-pkcs11 in Conda, and I don't have a Conda install on hand to try either.

FWIW: I run Python 3.10 on my daily development machine as well, so installing this package on Python 3.10 shouldn't be a problem in and of itself.

joseavegaa commented 2 years ago

The full output of the error is in the error attached.

install.log

Thanks for the help.

MatthiasValvekens commented 2 years ago

From a quick look at the stack trace and the corresponding code in distutils, here's what I think is going on:

Attempting to concatenate these leads to the error you're seeing. That happens over here: https://github.com/pypa/distutils/blob/bb74c98df88d072b83963a916ac3d749b1aa20e0/distutils/command/build_ext.py#L755.

I'm not familiar enough with distutils to definitively state which of the two should be considered "at fault", but that appears to be the root cause.

Kylar13 commented 2 years ago

I'm also getting this when trying to install on a Windows machine. Is there a workaround?