-
-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to install on windows as xmlsec is no longer available at ci.appveyor.com #110
Comments
I am having same issue here on Widnows. mehcode/python-xmlsec #88 |
Hi
The latest windows binaries are available here
https://github.com/mehcode/python-xmlsec/releases/tag/1.3.5
pip install
https://github.com/mehcode/python-xmlsec/releases/download/1.3.5/xmlsec-1.3.52.dev0-cp36-cp36m-win_amd64.whl
or whatever version your python is and you should be all set.
…On Thu, Sep 27, 2018 at 12:40 PM Priyank Namdev ***@***.***> wrote:
I am having same issue here on Widnows. mehcode/python-xmlsec #88
<xmlsec/python-xmlsec#88 (comment)>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#110 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AkTiWRqF2q9AoWVQytBjKar2mpL0KiBbks5ufHnRgaJpZM4WX1Zs>
.
|
pip install python3-saml
Command "/home/sun/.virtualenvs/tornado-saml/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-q2n7gu9h/xmlsec/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-zye1zslx/install-record.txt --single-version-externally-managed --compile --install-headers /home/sun/.virtualenvs/tornado-saml/include/site/python3.6/xmlsec" failed with error code 1 in /tmp/pip-install-q2n7gu9h/xmlsec/ |
Are libxmlsec1-dev and pkg-config installed? |
@pitbulk |
libxmlsec1-dev is a system dependency, not a python package that you install with pip |
@pitbulk |
??? sudo apt-get install libxmlsec1-dev |
@pitbulk |
@pitbulk |
Do we know if we have updated wheel for python3.7? |
python3-saml supports python 3.7: |
@pitbulk yeah that's right and I'm trying to install python3_saml-1.5.0. While doing so on windows I'm getting the exact same error as reported in this issue. so I was wondering if there is windows wheel file for xmlsec which supports python 3.7. when I checked the xmlsec as mentioned here - https://github.com/mehcode/python-xmlsec/releases/tag/1.3.5 it supports till python 3.6. Do you have any pointer? |
No idea. |
submitted a pull request to fix the issue on windows no response so far. |
Using python 3.7 on windows 10
|
@daveisagit thats my issue as well, only im using python 3.8 |
@daveisagit @ronica4 I'm having the same issue with python 3.7 on windows 10. Have either of you found a solution? |
I ended up using https://python-social-auth.readthedocs.io/ for now since it can authenticate Azure AD via Oauth2 natively (instead of SAML) which doesn’t require XMLSEC1. That’s just my use case though. User experience is identical at least. Good luck! |
@miranda-elliott Did you manage to find an alternative or workaround on this? |
@ronica4 @miranda-elliott @Joesafe I'd love to be able to remember what I did exactly, but it involved compiling it from source https://github.com/mehcode/python-xmlsec/releases and getting the headers from somewhere and using the right version of vs_BuildTools. Took a couple of days, dreadful experience. This was only to prototype on my laptop. Once I deployed my code to the linux server I had no issue at all with the usual pip install. Sorry I can't be more explicit, it was a while ago and I was in a frustrated mood. |
This is workaround on docker, not answer.I was able to get this work on docker (for windows) inside container using below
|
@RSwarnkar hey, i am new to docker and wondered if could get a bit more info about your comment. does it mean i need to run my code in a docker container? how will i edit my code there? |
I have built windows wheels for pip install python3-saml --extra-index-url=https://hoefling.io/pypi I will prepare a PR for |
@hoefling hi, i've been trying to use it now and it still won't work, i can't install libxml2 as well |
@ronica4 what error do you get exactly? |
@hoefling
Command "C:\Users\user\PycharmProjects\ronicasportal\venv\Scripts\python.exe -u -c "import setuptools, tokenize;file='C:\Users\user\AppData\Local\Temp\pip-install-myh80q3z\xmlsec\setup.py';f=getattr(to |
Hi Ronica Shouldn't your command be instead of |
Both commnds should work; @ronica4 can you add the output of
and also by the way,
both executed from inside your virtual env? For some reason, |
i tried it as well, here's the error
Command "C:\Users\user\PycharmProjects\ronicasportal\venv\Scripts\python.exe -u -c "import setuptools, tokenize;file='C:\Users\user\AppData\Local\Temp\pip-install-7n6bht0k\xmlsec\setup.py';f=getattr(to |
that for second command |
@ronica4 for now, it looks like a local issue that I can't reproduce on my winsows VMs. In the output you posted here,
I suspect your virtual env is borked. If you have the recent |
ERROR: unknown command "debug" |
is there a way to fix it all? |
@ronica4 test whether you can install in a new virtual env:
|
wow it worked!! it took so long thank you!! can you explain please what was the problem? i'm not so familiar with all those pip and venv stuff :) @hoefling |
Remove your virtual env under |
@hoefling Your pypi repo worked flawlessly here. Thank you! |
@fabiopedrosa you'll need the usual stuff, Visual C++ Build Tools for the target python version, the rest will do the package's setup script. For Python 2.7, you'll have to apply a small patch to fix compatibility issue with old VC++ version: diff --git a/src/enc.c b/src/enc.c
index 9db0b1b..199e94a 100644
--- a/src/enc.c
+++ b/src/enc.c
@@ -169,6 +169,7 @@ static PyObject* PyXmlSec_EncryptionContextEncryptBinary(PyObject* self, PyObjec
// release the replaced nodes in a way safe for `lxml`
static void PyXmlSec_ClearReplacedNodes(xmlSecEncCtxPtr ctx, PyXmlSec_LxmlDocumentPtr doc) {
+ PyXmlSec_LxmlElementPtr* elem;
// release the replaced nodes in a way safe for `lxml`
xmlNodePtr n = ctx->replacedNodeList;
xmlNodePtr nn;
@@ -177,7 +178,7 @@ static void PyXmlSec_ClearReplacedNodes(xmlSecEncCtxPtr ctx, PyXmlSec_LxmlDocume
PYXMLSEC_DEBUGF("clear replaced node %p", n);
nn = n->next;
// if n has references, it will not be deleted
- PyXmlSec_LxmlElementPtr* elem = PyXmlSec_elementFactory(doc, n);
+ elem = PyXmlSec_elementFactory(doc, n);
if (NULL == elem)
xmlFreeNode(n);
else |
A new version 1.3.7 of pip install xmlsec Should you experience any issues with prebuilt wheels on Windows, please don't hesitate to open a new issue. |
Hi
Please have a look at the error
λ pip install python3-saml
Collecting python3-saml
Using cached https://files.pythonhosted.org/packages/d9/2c/009c0153f6e1b7b54fda3de2eaf18558e9c222f3cb938b25a07229ffb375/python3_saml-1.4.1-py3-none-any.whl
Requirement already satisfied: defusedxml==0.5.0 in c:\python36\lib\site-packages (from python3-saml) (0.5.0)
Collecting isodate>=0.5.0 (from python3-saml)
Using cached https://files.pythonhosted.org/packages/9b/9f/b36f7774ff5ea8e428fdcfc4bb332c39ee5b9362ddd3d40d9516a55221b2/isodate-0.6.0-py2.py3-none-any.whl
Collecting xmlsec>=0.6.0 (from python3-saml)
Using cached https://files.pythonhosted.org/packages/35/42/d7cd323c91d4706f3cc32ffe7d5f851ab8ef9898ccb350f6ba593dd8b89a/xmlsec-1.3.3.tar.gz
Requirement already satisfied: six in c:\python36\lib\site-packages (from isodate>=0.5.0->python3-saml) (1.11.0)
Requirement already satisfied: pkgconfig in c:\python36\lib\site-packages (from xmlsec>=0.6.0->python3-saml) (1.4.0)
Requirement already satisfied: lxml>=3.0 in c:\python36\lib\site-packages (from xmlsec>=0.6.0->python3-saml) (4.2.1)
Installing collected packages: isodate, xmlsec, python3-saml
Running setup.py install for xmlsec ... error
Complete output from command c:\python36\python.exe -u -c "import setuptools, tokenize;file='C:\Users\lenovo\AppData\Local\Temp\pip-install-_7txskiq\xmlsec\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\lenovo\AppData\Local\Temp\pip-record-__06dbb3\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
Retrieving "https://ci.appveyor.com/api/buildjobs/hij3a6776pdv2007/artifacts/libxml2-2.9.4.win64.zip" to "build/extra\libxml2-2.9.4.win64.zip"
Command "c:\python36\python.exe -u -c "import setuptools, tokenize;file='C:\Users\lenovo\AppData\Local\Temp\pip-install-_7txskiq\xmlsec\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\lenovo\AppData\Local\Temp\pip-record-__06dbb3\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\lenovo\AppData\Local\Temp\pip-install-_7txskiq\xmlsec\
The text was updated successfully, but these errors were encountered: