Repository navigation
Closed
Description
Hello,
Currently trying to install slycot in conjunction with control.
No issues installing the control library in both Python2 and Python3.
While running sudo pip[3] install slycot, I get the following output:
Collecting slycot
Using cached https://files.pythonhosted.org/packages/ae/9d/7ed3f2abf08aab0be9ac2b67e3040c20d9c594cce6a4af2203da0c28a6c4/slycot-0.3.5.0.tar.gz
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /usr/local/lib/python3.5/dist-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpuby90lub
cwd: /tmp/pip-install-4y2kxn4y/slycot
Complete output (10 lines):
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/pip/_vendor/pep517/_in_process.py", line 207, in <module>
main()
File "/usr/local/lib/python3.5/dist-packages/pip/_vendor/pep517/_in_process.py", line 197, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/local/lib/python3.5/dist-packages/pip/_vendor/pep517/_in_process.py", line 48, in get_requires_for_build_wheel
backend = _build_backend()
File "/usr/local/lib/python3.5/dist-packages/pip/_vendor/pep517/_in_process.py", line 39, in _build_backend
obj = getattr(obj, path_part)
AttributeError: module 'setuptools.build_meta' has no attribute '__legacy__'
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 /usr/local/lib/python3.5/dist-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpuby90lub Check the logs for full command output.
I'd really like to know if this is a local issue and how to resolve it because I'm having issues using the main controls library because of errors related to needing slycot:
/usr/local/lib/python3.5/dist-packages/control/statefbk.py in lqr(*args, **keywords)
313 from slycot import sb02mt
314 except ImportError:
--> 315 raise ControlSlycot("can't find slycot module 'sb02md' or 'sb02nt'")
316
317 #
ControlSlycot: can't find slycot module 'sb02md' or 'sb02nt'
Thanks!
Metadata
Metadata
Assignees
Labels
No labels
Activity
moorepants commentedon Aug 8, 2019
Maybe this helps: pypa/setuptools#1694
atomoclast commentedon Aug 8, 2019
Thanks for the link.
I tried looking through it, but I'm not using a venv of any sort to get it setup...
I don't have a
pyproject.tomlfile in my environment as a result.moorepants commentedon Aug 8, 2019
Ok, good to know.
murrayrm commentedon Aug 9, 2019
@atomoclast: moved this over to
slycotsince that seems most relevant for this issue.bnavigator commentedon Aug 9, 2019
Have you also looked at pypa/pip#6264 ? Maybe
--no-use-pep517helps in your setup, too.Also the
pyproject.tomlmentioned would be the one of slycot. You could try manually downloading the package (or clone the repository), modify the file to containbuild-backend="setuptools.build_meta"and use pip to install the local package.roryyorke commentedon Aug 10, 2019
Slycot is unfortunately tricky to install from source, even from pip. What OS (including version) are you using?
I recommend using conda, and if you can't, to use a virtual environment. I don't think any of the developers use
sudo pip install slycot.One thing that occurs to me is that your pip might be out of date.
pip install -U pipfixes that, but I suspect that isn't a great idea when used withsudo.@bnavigator should we have
build-backend="setuptools.build_meta"in pyproject.toml (or somewhere else?)bnavigator commentedon Aug 10, 2019
Could also be setuptools being out of date.
__legacy__was only renamed 6 months ago. From the use ofsudoand Python version being 3.5, I suspect @atomoclast uses Ubunut 16.04. Quite old.Python packaging is a nightmare (see xkcd 1987) and using
pipsystem wide withsudois a common cause for inconsistencies. Use your distro's package manager or if the package is not available usepipas user, possibly in a venv, but avoidsudo. Conda is another option.From my experiment with opensuse build service it does not hurt at least. Next try would be a run with CI here.
Let's first see if it actually helps in @atomoclast's setup.
add build_backend to pyproject.toml (issue python-control#74)
atomoclast commentedon Aug 10, 2019
I'm using Ubuntu 16.04 right now. I can try to set-up a virtual env on my laptop and try a pip install then.
I don't want to use conda, because it mucks (granted, there are ways to tweak it) with some of the other local virtual environments we have for the host OS as well as the build system we use and such.
Maybe a clean virtual environment is the best way to keep it compartmentalized. :)
bnavigator commentedon Aug 10, 2019
Sounds like it's more a problem of your setup than of slycot. (Did I mention that xkcd already?)
Have you tried the
build-backendline or the--no-use-pep517option already? Also to reiterate, check the setuptools and pip versions you are using.roryyorke commentedon Apr 11, 2020
This was fixed in #67, released in 0.3.5; here's a
pip install slycotresult in a Python 3 virtual environment on my Ubuntu 18.04 system: