Giter Club home page Giter Club logo

Comments (6)

LukasVik avatar LukasVik commented on August 16, 2024 1

from docker.

eine avatar eine commented on August 16, 2024

So, the issue seems to be the following warning:

Using legacy 'setup.py install' for vunit-hdl, since package 'wheel' is not installed.

I now added wheel to the VUnit images (afb90b6). It seems that the problem was solved for "stable" images, but not for *-master:

# docker run --rm -it ghdl/vunit:mcode pip3 list
Package    Version
---------- -------
colorama   0.4.3
pip        20.2.2
setuptools 50.0.0
vunit-hdl  4.4.0
wheel      0.35.1

# docker run --rm -it ghdl/vunit:mcode-master pip3 list
Package    Version
---------- -------
pip        20.2.2
setuptools 50.0.0
wheel      0.35.1

# docker run --rm -it ghdl/vunit:llvm pip3 list
Package    Version
---------- -------
colorama   0.4.3
pip        20.2.2
setuptools 50.0.0
vunit-hdl  4.4.0
wheel      0.35.1

# docker run --rm -it ghdl/vunit:llvm-master pip3 list
Package    Version
---------- -------
pip        20.2.2
setuptools 50.0.0
wheel      0.35.1

# docker run --rm -it ghdl/vunit:gcc pip3 list
Package    Version
---------- -------
colorama   0.4.3
gcovr      4.2
Jinja2     2.11.2
lxml       4.5.2
MarkupSafe 1.1.1
pip        20.2.2
setuptools 50.0.0
vunit-hdl  4.4.0
wheel      0.35.1

# docker run --rm -it ghdl/vunit:gcc-master pip3 list
Package    Version
---------- -------
gcovr      4.2
Jinja2     2.11.2
lxml       4.5.2
MarkupSafe 1.1.1
pip        20.2.2
setuptools 50.0.0
wheel      0.35.1

That is, pip3 install vunit_hdl works now, but python3 setup.py install is still failing.

Unfortunately, I really don't understand the details of pip packages and the several mechanisms to install Python packages. Any guess?

I tried the same thing in the python:3-slim-buster (upon which ghdl/vunit:gcc-master is based?

No, ghdl/vunit:* images are based on ghdl/ghdl:buster-* images, which are based on debian:buster-slim.

OTOH, image python:3-slim-buster is used as a base for ghdl/ext:ls-debian. So, ghdl/ext:ls-vunit is based indirectly on python:3-slim-buster. It seems that wheel is/was installed in python:3-slim-buster, by default. Surprisingly, although python3 setup.py install is used (https://github.com/ghdl/docker/blob/master/gui.dockerfile#L25), it works:

# docker run --rm -it ghdl/ext:ls-vunit pip3 list
Package    Version
---------- --------
attrs      20.1.0
colorama   0.4.3
pip        20.2.2
pyghdl     1.0.dev0
setuptools 49.3.1
vunit-hdl  4.4.1rc0
wheel      0.34.2

from docker.

eine avatar eine commented on August 16, 2024

Some more info: when installed through python3 setup.py install, VUnit and colorama are indeed installed in /usr/lib/python3.7/site-packages/:

# ls /usr/lib/python3.7/site-packages/
colorama-0.4.3-py3.7.egg/     easy-install.pth              vunit_hdl-4.4.1rc0-py3.7.egg/

# cat /usr/lib/python3.7/site-packages/easy-install.pth
./vunit_hdl-4.4.1rc0-py3.7.egg
./colorama-0.4.3-py3.7.egg

But pip seems not to find those. Moreover, /usr/lib/python3/dist-packages/pip exists.

Conversely, in ghdl/ext:ls-vunit:

/# ls /usr/local/lib/python3.8/site-packages/
README.txt              colorama-0.4.3-py3.8.egg  pip                        setuptools-49.3.1.dist-info      
__pycache__             distutils-precedence.pth  pip-20.2.2.dist-info       vhdl_langserver
_distutils_hack         easy-install.pth          pkg_resources              vunit_hdl-4.4.1rc0-py3.8.egg     
attr                    easy_install.py           pyghdl-1.0.dev0.dist-info  wheel
attrs-20.1.0.dist-info  libghdl                   setuptools                 wheel-0.34.2.dist-info

from docker.

eine avatar eine commented on August 16, 2024

Now, pip3 install . is used instead of python3 setup.py install. That should fix all the images:

# docker run --rm -it ghdl/vunit:mcode pip3 list
Package    Version
---------- -------
colorama   0.4.3
pip        20.2.2
setuptools 50.0.0
vunit-hdl  4.4.0
wheel      0.35.1

# docker run --rm -it ghdl/vunit:mcode-master pip3 list
Package    Version
---------- --------
colorama   0.4.3
pip        20.2.2
setuptools 50.0.0
vunit-hdl  4.4.1rc0
wheel      0.35.1

# docker run --rm -it ghdl/vunit:llvm pip3 list
Package    Version
---------- -------
colorama   0.4.3
pip        20.2.2
setuptools 50.0.0
vunit-hdl  4.4.0
wheel      0.35.1

# docker run --rm -it ghdl/vunit:llvm-master pip3 list
Package    Version
---------- --------
colorama   0.4.3
pip        20.2.2
setuptools 50.0.0
vunit-hdl  4.4.1rc0
wheel      0.35.1

# docker run --rm -it ghdl/vunit:gcc pip3 list
Package    Version
---------- -------
colorama   0.4.3
gcovr      4.2
Jinja2     2.11.2
lxml       4.5.2
MarkupSafe 1.1.1
pip        20.2.2
setuptools 50.0.0
vunit-hdl  4.4.0
wheel      0.35.1

# docker run --rm -it ghdl/vunit:gcc-master pip3 list
Package    Version
---------- --------
colorama   0.4.3
gcovr      4.2
Jinja2     2.11.2
lxml       4.5.2
MarkupSafe 1.1.1
pip        20.2.2
setuptools 50.0.0
vunit-hdl  4.4.1rc0
wheel      0.35.1

@LukasVik, please, let me know whether it works for you. If so, I think we can close this issue πŸ˜ƒ

from docker.

LukasVik avatar LukasVik commented on August 16, 2024

Good morning,

Indeed it does work well now. Thank you so much @eine!

Looking at the issue I still find it a little funny. I'm not an expert at pip, but there must be some mechanism that is broken in there. Where it supposedly installs a package, the files are there in the file tree, but it has not "registered" that it is installed. If pip truly needs wheel in order to install packages, it should signal an error instead of the warning we got.

I googled the issue yesterday and I could not find anyone else with the same issue. And it also does not appear to happen in all python environments. On my ubuntu box I could install vunit_hdl just fine without wheel, and also in the python:3-slim-buster image after doing pip uninstall wheel.

Just to note, I don't think it has anything to do with the vunit_hdl package specifically. I observed the same issue with a python package named wrapt and indeed the tsfpga package.

Anyway, the fix/workaround works and that is all that matters I guess. I feel no need to dig deeper into the issue. Something seems a little sketchy but it works now! Closing this issue. Thanks again @eine!

from docker.

eine avatar eine commented on August 16, 2024

@LukasVik, just for the sake of knowledge, let me drop my thoughts too:

However, I don't understand what's the role of pip there. Also, I am not familiar with easy_install. Using python3 setup.py install seems to be "the easy_install/Egg way of doing things", while pip uses wheel. See https://packaging.python.org/discussions/pip-vs-easy-install/ and https://packaging.python.org/discussions/wheel-vs-egg/. Still, as you say, it is funny that this was working for months/years, and it broke yesterday without an explicit warning. I mean, the warning was shown by tox long before, not by setuptools.

On my ubuntu box I could install vunit_hdl just fine without wheel, and also in the python:3-slim-buster image after doing pip uninstall wheel.

Is it possible that both your Ubuntu box and python:3-slim-buster have Python >=3.8? I'm thinking that this might be an issue with 3.7, 3.6... But I did not carefully read pypa/setuptools issues yet.

from docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.