8000 Is it possible to ship the package quadprog and its parent qpsolvers in the WinPython · Issue #955 · winpython/winpython · GitHub
[go: up one dir, main page]

Skip to content

Is it possible to ship the package quadprog and its parent qpsolvers in the WinPython #955

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

Closed
asmwarrior opened this issue Apr 9, 2021 · 32 comments

Comments

@asmwarrior
Copy link

Hi, I use WinPython for teaching robotics for my students. WinPython is a portable and easy tool for scientific teaching. Thanks for your work.

When I try to use a python package called robotics-toolbox-python, I meet an issue that, when I try to install robotics-toolbox-python, I have to install its dependencies package such as quadprog, while this need Visual C++ compiler command line tool to be installed in my OS. While to install the Visual C++ compiler, one needs to download about 2G bytes size files, and have 4G bytes disk space installed. This is not a simple task as we have to ask every students who use WinPython to build the quadprog and its parent qpsolvers packages.

I have reported in the following issue:
Is it possible to build a whl package which contains all the pyd/dll files · Issue #207 · petercorke/robotics-toolbox-python

It looks like some other Python suite, such as conda doesn't have such issue because it already quadprog package pre-installed.

Any suggestions?

Thanks.

@stonebig
Copy link
Contributor
stonebig commented Apr 10, 2021

If it's not in cgohlke wheels, like also cyipopt, it's a problem today, less than yesterday and more than tomorrow, but still a problem.

@stonebig
Copy link
Contributor

Is there a close enough equivalent in existing cgohlke wheels ?

@stonebig
Copy link
Contributor

Well, the suggestion to have a Jump interface to quadprod solver is interesting.
I didn't check if quadprod is just compilable
... two hopes for you

@stonebig
Copy link
Contributor

there is this quadprog/quadprog#17

leading to this https://github.com/stephane-caron/qpsolvers

and this

@stonebig
Copy link
Contributor
stonebig commented Apr 10, 2021

so... maybe yes for quadprod, for the qpsolvers thing, needs further reading.
and how would I check it works ?

@stonebig
Copy link
Contributor

is this other thing qdldl required for you ?

@stonebig
Copy link
Contributor

image

@asmwarrior
Copy link
Author
asmwarrior commented Apr 10, 2021

is this other thing qdldl required for you ?

My request is quite simple, and I would avoid using the Visual C++ compiler when I install the robotics-toolbox-python. Sorry and I see you have much experience about other functions such as qdldl, and I really don't know what they are.

I see you add this to 2021-02 Spyder-5 / Matplotlib-3.4, and what is the solution? I can add those my requested packages?

Thanks.

@stonebig
Copy link
Contributor

qpsolvers and quadprog will be in it, this next few days.

@stonebig
Copy link
Contributor

can't get better than this in jupyterlab....
image

@asmwarrior
Copy link
Author

qpsolvers and quadprog will be in it, this next few days.

OK, thanks!

This is the screen cast when I run the robotics tool box (git version) with the vpython back end, (robotics-toolbox-python/puma_jtraj.py at master · petercorke/robotics-toolbox-python). I'm not good at using jupyterlab, I just use the Spyder from your WinPython 3.8.8.0.

vpython_robotics_toolbox_arm1

@stonebig
Copy link
Contributor

ok.

@stonebig
Copy link
Contributor
stonebig commented Apr 11, 2021

You'll get also qdldl-0.1.5.post0 , as it was impeaching to get osqp-0.6.2.post

@stonebig
Copy link
Contributor

I followed robotics-toolbox-python threads and related:

  • interesting,
  • now is a good moment to participate (in the sense: propose patches anywhere to improve WinPython integration),
  • but it's too early to integrate.

WinPython contribution this cycle will be to include underlying packages: qpsolvers , quadprog and qdldl.

@asmwarrior
Copy link
Author

I followed robotics-toolbox-python threads and related:

* interesting,

* now is a good moment to participate (in the sense: propose patches anywhere to improve WinPython integration),

* but it's too early to integrate.

WinPython contribution this cycle will be to include underlying packages: qpsolvers , quadprog and qdldl.

OK, thanks, I understand your idea. This will save me and my students a lot of time to install the MS Visual compiler.

In-fact, install robotics-toolbox-python from pip command is simple, for me, I use the github version, because I found currently there are many issues of the examples, some are already fixed in the github git master, but not in their release.

@asmwarrior
Copy link
Author

I see that some core functions in the robotic tool box are implemented in C language, see here:

https://github.com/petercorke/robotics-toolbox-python/tree/master/roboticstoolbox/core

So, I still have to install the visual C++ compiler to use/install this package.

@stonebig
Copy link
Contributor

It depends if it's provided as a wheel or not

@stonebig
Copy link
Contributor

The fact that this c code call a numpy object is very curious to me, I suppose they had a reason for not using cython.

@stonebig
Copy link
Contributor
stonebig commented May 4, 2021

I see the new generation of robotics-toolbox and swift are out.

@asmwarrior
Copy link
Author

I see the new generation of robotics-toolbox and swift are out.

Thanks for the notification. I never know this.
I see that you have a new winpython too.

I will try both of them too.

Do you mean that I can just download the the latest winpython from: WinPython 2021-02 of April 21st, 2021

Then I can use the pip command to install the latest robotics-toolbox and swift without the visual studio C++ compiler suite?

Thanks.

@asmwarrior
Copy link
Author

I just tried the latest winpython 3.8.9, but pip install just failed, I'm not sure why:

E:\download\sci\python\WPy64-3890\scripts>pip install roboticstoolbox-python
WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
distutils: E:\download\sci\python\WPy64-3890\python-3.8.9.amd64\Include\UNKNOWN
sysconfig: E:\download\sci\python\WPy64-3890\python-3.8.9.amd64\Include
WARNING: Additional context:
user = False
home = None
root = None
prefix = None
Looking in indexes: https://pypi.douban.com/simple
ERROR: Could not find a version that satisfies the requirement roboticstoolbox-python (from versions: none)
ERROR: No matching distribution found for roboticstoolbox-python

@stonebig
Copy link
Contributor
stonebig commented May 4, 2021

Try pip install sqlite-bro ... to see if something basic works

@asmwarrior
Copy link
Author

Try pip install sqlite-bro ... to see if something basic works

Thanks, I just tried, and here is the result:

E:\download\sci\python\WPy64-3890\scripts>pip install sqlite-bro
WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
distutils: E:\download\sci\python\WPy64-3890\python-3.8.9.amd64\Include\UNKNOWN
sysconfig: E:\download\sci\python\WPy64-3890\python-3.8.9.amd64\Include
WARNING: Additional context:
user = False
home = None
root = None
prefix = None
Looking in indexes: https://pypi.douban.com/simple
Requirement already satisfied: sqlite-bro in e:\download\sci\python\wpy64-3890\python-3.8.9.amd64\lib\site-packages (0.9.1)
WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
distutils: E:\download\sci\python\WPy64-3890\python-3
8000
.8.9.amd64\Include\UNKNOWN
sysconfig: E:\download\sci\python\WPy64-3890\python-3.8.9.amd64\Include
WARNING: Additional context:
user = False
home = None
root = None
prefix = None

E:\download\sci\python\WPy64-3890\scripts>

@stonebig
Copy link
Contributor
stonebig commented May 4, 2021

If no explanation, maybe try scripts\upgrade_pip.bat

@asmwarrior
Copy link
Author
asmwarrior commented May 4, 2021

If no explanation, maybe try scripts\upgrade_pip.bat

This is the result, still no luck.

E:\download\sci\python\WPy64-3890\scripts>upgrade_pip.bat
this will upgrade pip with latest version, then patch it for WinPython portability ok ?
请按任意键继续. . .
WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
distutils: E:\download\sci\python\WPy64-3890\python-3.8.9.amd64\Include\UNKNOWN
sysconfig: E:\download\sci\python\WPy64-3890\python-3.8.9.amd64\Include
WARNING: Additional context:
user = False
home = None
root = None
prefix = None
Looking in indexes: https://pypi.douban.com/simple
Requirement already satisfied: pip in e:\download\sci\python\wpy64-3890\python-3.8.9.amd64\lib\site-packages (21.1.dev0)
WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
distutils: E:\download\sci\python\WPy64-3890\python-3.8.9.amd64\Include\UNKNOWN
sysconfig: E:\download\sci\python\WPy64-3890\python-3.8.9.amd64\Include
WARNING: Additional context:
user = False
home = None
root = None
prefix = None
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "E:\download\sci\python\WPy64-3890\python-3.8.9.amd64\lib\site-packages\winpython\wppm.py", line 552, in patch_standard_packages
    utils.patch_sourcefile(
  File "E:\download\sci\python\WPy64-3890\python-3.8.9.amd64\lib\site-packages\winpython\utils.py", line 484, in patch_sourcefile
    content = fh.read()
UnicodeDecodeError: 'gbk' codec can't decode byte 0x9e in position 7273: illegal multibyte sequence
请按任意键继续. . .

E:\download\sci\python\WPy64-3890\scripts>

The Chinese words 请按任意键继续. . . means press any key to continue.

@asmwarrior
Copy link
Author

There is a long discussion here:

WARNING: Value for scheme.scripts does not match. Please report this to <https://github.com/pypa/pip/issues/9617

But sorry I don't quite understand that pypa issue.

@stonebig
Copy link
Contributor
stonebig commented May 4, 2021

Argh, I thought everything was utf-8 now.
apparently it didn't upgrade your pip, which is odd to me.

You are in mainland ?

@asmwarrior
Copy link
Author

Argh, I thought everything was utf-8 now.
apparently it didn't upgrade your pip, which is odd to me.

I will try it in another PC today.

You are in mainland ?

Yes.

@stonebig
Copy link
Contributor
stonebig commented May 8, 2021

so, did you understand/resolve this issue ?

@stonebig
Copy link
Contributor
stonebig commented May 8, 2021

hum, I'll put my stupid pagecode guesser in the winpython/utils offending line

@stonebig
Copy link
Contributor
stonebig commented May 8, 2021

seems a general error, in fact WinPython didn't open in utf-8 per default but in system default

@asmwarrior
Copy link
Author

so, did you understand/resolve this issue ?

No.
I am still using 3.8.8.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0