[chimerax-users] Errors hold when Plugin a bundle into ChimeraX toolshed

He, Jing jhe at cs.odu.edu
Fri Apr 23 14:45:35 PDT 2021


Thanks, Tom. We have updated our code so that quadprog is not being used.
Jing
________________________________
From: Yongcheng MU <ymu004 at odu.edu>
Sent: Tuesday, April 6, 2021 7:33 PM
To: Tom Goddard <goddard at sonic.net>
Cc: ChimeraX Users Help <chimerax-users at cgl.ucsf.edu>; He, Jing <jhe at cs.odu.edu>
Subject: Re: [chimerax-users] Errors hold when Plugin a bundle into ChimeraX toolshed

Hello Tom,

I understand now. Thank you very much for your clarification.

Best regards,
Yongcheng

On Tue, Apr 6, 2021 at 5:53 PM Tom Goddard <goddard at sonic.net<mailto:goddard at sonic.net>> wrote:
Hi Yongcheng,

  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.

  You should be able to get quadprog to compile on Windows with some effort to figure out why pip is unhappy.

  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.

Tom


On Apr 6, 2021, at 12:07 PM, Yongcheng MU <ymu004 at odu.edu<mailto:ymu004 at odu.edu>> wrote:

Hello Tom,

Thank you so much for your reply.

Yes, I am developing this DLstruct Plugin. I have some other questions:

    1. I have Visual studio code (attached below). Do I still need to install Visual Studio 2019 to use instead of Visual Studio Code
    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?
Thank you for your time.

Best regards,
Yongcheng

 (C++ 14 in the Visual Studio code APP)
[Screen Shot 2021-04-06 at 2.00.04 PM.png]

(Bundle info and Dependencies)
[Screen Shot 2021-04-06 at 2.00.35 PM.png]

On Tue, Apr 6, 2021 at 1:53 PM Tom Goddard <goddard at sonic.net<mailto:goddard at sonic.net>> wrote:
Hi Yongcheng,

  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

https://pypi.org/project/quadprog/#files<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpypi.org%2Fproject%2Fquadprog%2F%23files&data=04%7C01%7Cjhe%40cs.odu.edu%7C004a30967e5b4693399708d8f9546618%7C48bf86e811a24b8a8cb368d8be2227f3%7C0%7C0%7C637533488198727312%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ngryl5fi5tYVujS2hNG7qcrc4XkyTXGsbX4gsMcRV%2BQ%3D&reserved=0>

and your error indicates it needs to be compiled with Microsoft Visual C++ compilers which you apparently do not have installed.

building 'quadprog' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvisualstudio.microsoft.com%2Fdownloads%2F&data=04%7C01%7Cjhe%40cs.odu.edu%7C004a30967e5b4693399708d8f9546618%7C48bf86e811a24b8a8cb368d8be2227f3%7C0%7C0%7C637533488198727312%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=vk94PCrdrAI%2FSJPK1G7233t0zAAtKCFMW7gyhWRm1P8%3D&reserved=0>

You will have to get the C++ compiler to build quadprog on Windows.

Tom



On Apr 6, 2021, at 8:31 AM, Yongcheng MU <ymu004 at odu.edu<mailto:ymu004 at odu.edu>> wrote:

Hello,

Hope this email finds you well.

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?

Best regards,
Yongcheng



[toolshed install Z:/Plugin_dl\dist\ChimeraX_DLStruct-0.1-py3-none-
any.whl](cxcmd:toolshed install
Z:/Plugin_dl\\dist\\ChimeraX_DLStruct-0.1-py3-none-any.whl)

Traceback (most recent call last):
File "C:\Program Files\ChimeraX 1.1\bin\lib\site-packages\chimerax\toolshed_utils\__init__.py", line 489, in _pip_install
results = _run_pip(command, logger)
File "C:\Program Files\ChimeraX 1.1\bin\lib\site-packages\chimerax\toolshed_utils\__init__.py", line 540, in _run_pip
raise RuntimeError(s)
RuntimeError: Looking in indexes: https://pypi.org/simple<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpypi.org%2Fsimple&data=04%7C01%7Cjhe%40cs.odu.edu%7C004a30967e5b4693399708d8f9546618%7C48bf86e811a24b8a8cb368d8be2227f3%7C0%7C0%7C637533488198737304%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=4nYgCBL8c0an0PIihPe1uXvk%2F7dlqL1Hfq3iC3wGg2M%3D&reserved=0>, https://cxtoolshed.rbvi.ucsf.edu/pypi/<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcxtoolshed.rbvi.ucsf.edu%2Fpypi%2F&data=04%7C01%7Cjhe%40cs.odu.edu%7C004a30967e5b4693399708d8f9546618%7C48bf86e811a24b8a8cb368d8be2227f3%7C0%7C0%7C637533488198737304%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=05Q4wJQR8V7EFeuxN1PyEcSjlyJT9JTVuaHOMyy0dlM%3D&reserved=0>
Processing z:\plugin_dl\dist\chimerax_dlstruct-0.1-py3-none-any.whl
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)
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)
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)
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)
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)
Collecting quadprog~=0.1.7
Using cached quadprog-0.1.8.tar.gz (269 kB)
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)
Collecting importlib-metadata~=0.17
Using cached importlib_metadata-0.23-py2.py3-none-any.whl (28 kB)
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)
Building wheels for collected packages: quadprog
Building wheel for quadprog (setup.py): started
Building wheel for quadprog (setup.py): finished with status 'error'
Running setup.py clean for quadprog
Failed to build quadprog
Installing collected packages: quadprog, importlib-metadata, ChimeraX-DLStruct
Running setup.py install for quadprog: started
Running setup.py install for quadprog: finished with status 'error'
ERROR: Command errored out with exit status 1:
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'
cwd: C:\Users\ymu\AppData\Local\Temp\pip-install-xakoctiw\quadprog_7cb25d8bb3904ea3b64643e58389ec80\
Complete output (6 lines):
running bdist_wheel
running build
running build_ext
skipping 'quadprog\quadprog.cpp' Cython extension (up-to-date)
building 'quadprog' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvisualstudio.microsoft.com%2Fdownloads%2F&data=04%7C01%7Cjhe%40cs.odu.edu%7C004a30967e5b4693399708d8f9546618%7C48bf86e811a24b8a8cb368d8be2227f3%7C0%7C0%7C637533488198747300%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=BP8RbY9H1kr%2BLjtOUhmzJ80d797%2FcTeZ74fy34V4HXk%3D&reserved=0>
----------------------------------------
ERROR: Failed building wheel for quadprog
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 https://github.com/pypa/pip/issues/8368<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpypa%2Fpip%2Fissues%2F8368&data=04%7C01%7Cjhe%40cs.odu.edu%7C004a30967e5b4693399708d8f9546618%7C48bf86e811a24b8a8cb368d8be2227f3%7C0%7C0%7C637533488198747300%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=7l2cP0DiuUtlzEiM7Hfqteov3%2B%2BhRKeNudjpSOkmNoI%3D&reserved=0>.
ERROR: Command errored out with exit status 1:
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'
cwd: C:\Users\ymu\AppData\Local\Temp\pip-install-xakoctiw\quadprog_7cb25d8bb3904ea3b64643e58389ec80\
Complete output (6 lines):
running install
running build
running build_ext
skipping 'quadprog\quadprog.cpp' Cython extension (up-to-date)
building 'quadprog' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvisualstudio.microsoft.com%2Fdownloads%2F&data=04%7C01%7Cjhe%40cs.odu.edu%7C004a30967e5b4693399708d8f9546618%7C48bf86e811a24b8a8cb368d8be2227f3%7C0%7C0%7C637533488198757294%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=zKB1xIvaXU0xqqinzCJL5KUvGL%2B5XMckIl50RzORXHI%3D&reserved=0>
----------------------------------------
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.
WARNING: You are using pip version 20.2.2; however, version 21.0.1 is available.
You should consider upgrading via the 'C:\Program Files\ChimeraX 1.1\bin\ChimeraX.exe -m pip install --upgrade pip' command.

_______________________________________________
ChimeraX-users mailing list
ChimeraX-users at cgl.ucsf.edu<mailto:ChimeraX-users at cgl.ucsf.edu>
Manage subscription:
https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplato.cgl.ucsf.edu%2Fmailman%2Flistinfo%2Fchimerax-users&data=04%7C01%7Cjhe%40cs.odu.edu%7C004a30967e5b4693399708d8f9546618%7C48bf86e811a24b8a8cb368d8be2227f3%7C0%7C0%7C637533488198757294%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=E3RWEkmNJ3AtJPSmSfkLbbkHvCy%2F9u5NxKqlEOa%2BjVk%3D&reserved=0>

_______________________________________________
ChimeraX-users mailing list
ChimeraX-users at cgl.ucsf.edu<mailto:ChimeraX-users at cgl.ucsf.edu>
Manage subscription:
https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplato.cgl.ucsf.edu%2Fmailman%2Flistinfo%2Fchimerax-users&data=04%7C01%7Cjhe%40cs.odu.edu%7C004a30967e5b4693399708d8f9546618%7C48bf86e811a24b8a8cb368d8be2227f3%7C0%7C0%7C637533488198767290%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=tG2aH9OP3eYOnjc1hlIvd6dCYpQoX4Y8UMX5nbsQqzo%3D&reserved=0>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimerax-users/attachments/20210423/30a89257/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2021-04-06 at 2.00.04 PM.png
Type: image/png
Size: 1045769 bytes
Desc: Screen Shot 2021-04-06 at 2.00.04 PM.png
URL: <http://plato.cgl.ucsf.edu/pipermail/chimerax-users/attachments/20210423/30a89257/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2021-04-06 at 2.00.35 PM.png
Type: image/png
Size: 1203907 bytes
Desc: Screen Shot 2021-04-06 at 2.00.35 PM.png
URL: <http://plato.cgl.ucsf.edu/pipermail/chimerax-users/attachments/20210423/30a89257/attachment-0003.png>


More information about the ChimeraX-users mailing list