<div dir="ltr">Hello Tom,<div><br></div><div>I understand now. Thank you very much for your clarification.</div><div><br></div><div>Best regards,</div><div>Yongcheng</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 6, 2021 at 5:53 PM Tom Goddard <<a href="mailto:goddard@sonic.net">goddard@sonic.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">Hi Yongcheng,<div><br></div><div> ChimeraX is just using pip to install your DLStudio wheel file and pip sees that it lists a dependency on quadprog from PyPi so it fetches that. This is just normal pip install behavior. But for whatever reason it cannot find your C++ compiler on Windows so the pip install of quadprog fails. To debug this I suggest installing Python 3 on your Windows machine and trying a "pip install quadprog" and see if that fails -- I assume it will, possibly because it cannot find your Visual Studio or considers it not compatible with what quadprog requires.</div><div><br></div><div> You should be able to get quadprog to compile on Windows with some effort to figure out why pip is unhappy.</div><div><br></div><div> If you are creating this DLstruct plugin to distribute to others for example on ChimeraX Toolshed you should be aware that almost no Windows users will have a C++ compiler, so quadprog will not install on their systems. The basic problem is the quadprog developers have not provided Windows builds on PyPi. So this will make it unusable in your plugin on Windows. A somewhat painful way to work around this is to compile the Windows quadprog yourself and include it in your ChimeraX plugin (as extra data files) instead of listing it as a dependency. Maybe instead you could convince the quadprog developer to put a Windows version on PyPi -- as it is now it simply is not usable on Windows for the majority of users who do not develop their own C++ code.</div><div><br></div><div><span style="white-space:pre-wrap"> </span>Tom</div><div><br></div><div><div><br><blockquote type="cite"><div>On Apr 6, 2021, at 12:07 PM, Yongcheng MU <<a href="mailto:ymu004@odu.edu" target="_blank">ymu004@odu.edu</a>> wrote:</div><br><div><div dir="ltr">Hello Tom,<div><br></div><div>Thank you so much for your reply.</div><div><br></div><div>Yes, I am developing this DLstruct Plugin. I have some other questions:</div><div> </div><div> 1. I have Visual studio code (attached below). Do I still need to install Visual Studio 2019 to use instead of Visual Studio Code</div><div> 2. How does ChimeraX find the required packages? In my understanding, if ChimeraX couldn't find a required package in the system, it will install the package automatically by using pip, is that correct?</div><div>Thank you for your time.</div><div><br>Best regards,</div><div>Yongcheng</div><div><br></div><div><b><i><font color="#ff0000"> (C++ 14 in the Visual Studio code APP)</font></i></b></div><div><img alt="Screen Shot 2021-04-06 at 2.00.04 PM.png" style="margin-right: 0px;" id="gmail-m_-41981607783837547901E5399E7-296F-4C2F-8802-F730950905A8" width="695" height="383" src="cid:178a9873fe74e05b2201"> <br></div><div><br></div><div><b><i><font color="#ff0000">(Bundle info and Dependencies)</font></i></b></div><img alt="Screen Shot 2021-04-06 at 2.00.35 PM.png" style="margin-right: 0px;" id="gmail-m_-4198160778383754790585D9E92-956B-4E8E-B9D6-39AF13645E32" width="696" height="385" src="cid:178a9873fe772b42c022"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 6, 2021 at 1:53 PM Tom Goddard <<a href="mailto:goddard@sonic.net" target="_blank">goddard@sonic.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Hi Yongcheng,<div><br></div><div> Did you develop this DLStruct plugin? I have not seen it before. The error message says it was trying to install the quadprog package from PyPi, I guess a quadratic programming library. You can see on PyPi that it only has a source code distribution</div><div><br></div><div><span style="white-space:pre-wrap"> </span><a href="https://pypi.org/project/quadprog/#files" target="_blank">https://pypi.org/project/quadprog/#files</a></div><div><br></div><div>and your error indicates it needs to be compiled with Microsoft Visual C++ compilers which you apparently do not have installed.</div><div><br></div><div><blockquote type="cite"><div dir="ltr"><div><div><b><i><font color="#ff0000">building 'quadprog' extension <br>error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": <a href="https://visualstudio.microsoft.com/downloads/" target="_blank">https://visualstudio.microsoft.com/downloads/</a> </font></i></b></div></div></div></blockquote><div><br></div><div>You will have to get the C++ compiler to build quadprog on Windows.</div><div><br></div><div><span style="white-space:pre-wrap"> </span>Tom</div><div><br></div><div><br></div><div><br><blockquote type="cite"><div>On Apr 6, 2021, at 8:31 AM, Yongcheng MU <<a href="mailto:ymu004@odu.edu" target="_blank">ymu004@odu.edu</a>> wrote:</div><br><div><div dir="ltr">Hello,<div><br></div><div>Hope this email finds you well.</div><div><br></div><div>I'm trying to Plugin a bundle into ChimeraX. I have successfully installed a bundle on macOS, now I'm trying to install the bundle on a Window Desktop. It holds some errors, I searched a lot and I failed to fix this issue. I wonder if you have any suggestions?</div><div><br></div><div>Best regards,</div><div>Yongcheng<br><div><br></div><div><br></div><div><br>[toolshed install Z:/Plugin_dl\dist\ChimeraX_DLStruct-0.1-py3-none-<br>any.whl](cxcmd:toolshed install<br>Z:/Plugin_dl\\dist\\ChimeraX_DLStruct-0.1-py3-none-any.whl)<br><br>Traceback (most recent call last):<br>File "C:\Program Files\ChimeraX 1.1\bin\lib\site-packages\chimerax\toolshed_utils\__init__.py", line 489, in _pip_install<br>results = _run_pip(command, logger)<br>File "C:\Program Files\ChimeraX 1.1\bin\lib\site-packages\chimerax\toolshed_utils\__init__.py", line 540, in _run_pip<br><b><i><font color="#ff0000">raise RuntimeError(s)<br>RuntimeError: Looking in indexes: <a href="https://pypi.org/simple" target="_blank">https://pypi.org/simple</a>, <a href="https://cxtoolshed.rbvi.ucsf.edu/pypi/" target="_blank">https://cxtoolshed.rbvi.ucsf.edu/pypi/</a> </font></i></b><br>Processing z:\plugin_dl\dist\chimerax_dlstruct-0.1-py3-none-any.whl <br>Requirement already satisfied: ChimeraX-Core~=1.0 in c:\program files\chimerax 1.1\bin\lib\site-packages (from ChimeraX-DLStruct==0.1) (1.1) <br>Requirement already satisfied: numpy~=1.16.4 in c:\users\ymu\appdata\local\ucsf\chimerax\1.1\site-packages (from ChimeraX-DLStruct==0.1) (1.16.6) <br>Requirement already satisfied: torch~=1.7.1 in c:\users\ymu\appdata\local\ucsf\chimerax\1.1\site-packages (from ChimeraX-DLStruct==0.1) (1.7.1) <br>Requirement already satisfied: numpy~=1.16.4 in c:\users\ymu\appdata\local\ucsf\chimerax\1.1\site-packages (from ChimeraX-DLStruct==0.1) (1.16.6) <br>Requirement already satisfied: typing-extensions in c:\users\ymu\appdata\local\ucsf\chimerax\1.1\site-packages (from torch~=1.7.1->ChimeraX-DLStruct==0.1) (3.7.4.3) <br>Collecting quadprog~=0.1.7 <br>Using cached quadprog-0.1.8.tar.gz (269 kB) <br>Requirement already satisfied: Cython in c:\program files\chimerax 1.1\bin\lib\site-packages (from quadprog~=0.1.7->ChimeraX-DLStruct==0.1) (0.29.20) <br>Collecting importlib-metadata~=0.17 <br>Using cached importlib_metadata-0.23-py2.py3-none-any.whl (28 kB) <br>Requirement already satisfied: zipp>=0.5 in c:\users\ymu\appdata\local\ucsf\chimerax\1.1\site-packages (from importlib-metadata~=0.17->ChimeraX-DLStruct==0.1) (3.4.1) <br><b><i><font color="#e69138">Building wheels for collected packages: quadprog <br>Building wheel for quadprog (setup.py): started <br>Building wheel for quadprog (setup.py): finished with status 'error' <br>Running setup.py clean for quadprog </font><br><font color="#ff0000">Failed to build quadprog </font></i></b><br>Installing collected packages: quadprog, importlib-metadata, ChimeraX-DLStruct <br>Running setup.py install for quadprog: started <br>Running setup.py install for quadprog: finished with status 'error' <br><b><i><font color="#ff0000">ERROR: Command errored out with exit status 1: </font></i></b><br>command: 'C:\Program Files\ChimeraX 1.1\bin\ChimeraX.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ymu\\AppData\\Local\\Temp\\pip-install-xakoctiw\\quadprog_7cb25d8bb3904ea3b64643e58389ec80\\setup.py'"'"'; __file__='"'"'C:\\Users\\ymu\\AppData\\Local\\Temp\\pip-install-xakoctiw\\quadprog_7cb25d8bb3904ea3b64643e58389ec80\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\ymu\AppData\Local\Temp\pip-wheel-gloxcthl' <br>cwd: C:\Users\ymu\AppData\Local\Temp\pip-install-xakoctiw\quadprog_7cb25d8bb3904ea3b64643e58389ec80\ <br>Complete output (6 lines): <br>running bdist_wheel <br>running build <br>running build_ext <br><b><i><font color="#ff0000">skipping 'quadprog\quadprog.cpp' Cython extension (up-to-date) <br>building 'quadprog' extension <br>error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": <a href="https://visualstudio.microsoft.com/downloads/" target="_blank">https://visualstudio.microsoft.com/downloads/</a> </font></i></b><br>---------------------------------------- <br><b><i><font color="#ff0000">ERROR: Failed building wheel for quadprog <br>DEPRECATION: Could not build wheels for quadprog which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at <a href="https://github.com/pypa/pip/issues/8368" target="_blank">https://github.com/pypa/pip/issues/8368</a>. <br>ERROR: Command errored out with exit status 1: </font></i></b><br>command: 'C:\Program Files\ChimeraX 1.1\bin\ChimeraX.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ymu\\AppData\\Local\\Temp\\pip-install-xakoctiw\\quadprog_7cb25d8bb3904ea3b64643e58389ec80\\setup.py'"'"'; __file__='"'"'C:\\Users\\ymu\\AppData\\Local\\Temp\\pip-install-xakoctiw\\quadprog_7cb25d8bb3904ea3b64643e58389ec80\\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\ymu\AppData\Local\Temp\pip-record-gcrsp7lk\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\ymu\AppData\Local\UCSF\ChimeraX\Python37\Include\quadprog' <br>cwd: C:\Users\ymu\AppData\Local\Temp\pip-install-xakoctiw\quadprog_7cb25d8bb3904ea3b64643e58389ec80\ <br>Complete output (6 lines): <br>running install <br>running build <br>running build_ext <br>skipping 'quadprog\quadprog.cpp' Cython extension (up-to-date) <br>building 'quadprog' extension <br>error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": <a href="https://visualstudio.microsoft.com/downloads/" target="_blank">https://visualstudio.microsoft.com/downloads/</a> <br>---------------------------------------- <br>ERROR: Command errored out with exit status 1: 'C:\Program Files\ChimeraX 1.1\bin\ChimeraX.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ymu\\AppData\\Local\\Temp\\pip-install-xakoctiw\\quadprog_7cb25d8bb3904ea3b64643e58389ec80\\setup.py'"'"'; __file__='"'"'C:\\Users\\ymu\\AppData\\Local\\Temp\\pip-install-xakoctiw\\quadprog_7cb25d8bb3904ea3b64643e58389ec80\\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\ymu\AppData\Local\Temp\pip-record-gcrsp7lk\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\ymu\AppData\Local\UCSF\ChimeraX\Python37\Include\quadprog' Check the logs for full command output. <br>WARNING: You are using pip version 20.2.2; however, version 21.0.1 is available. <br>You should consider upgrading via the 'C:\Program Files\ChimeraX 1.1\bin\ChimeraX.exe -m pip install --upgrade pip' command. <br><br></div></div></div>
_______________________________________________<br>ChimeraX-users mailing list<br><a href="mailto:ChimeraX-users@cgl.ucsf.edu" target="_blank">ChimeraX-users@cgl.ucsf.edu</a><br>Manage subscription:<br><a href="https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users" target="_blank">https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users</a><br></div></blockquote></div><br></div></div></blockquote></div>
_______________________________________________<br>ChimeraX-users mailing list<br><a href="mailto:ChimeraX-users@cgl.ucsf.edu" target="_blank">ChimeraX-users@cgl.ucsf.edu</a><br>Manage subscription:<br><a href="https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users" target="_blank">https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users</a><br></div></blockquote></div><br></div></div></blockquote></div>