-
Notifications
You must be signed in to change notification settings - Fork 189
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
AttributeError: module 'pip' has no attribute 'get_installed_distributions' #238
Comments
Running
Builds and starts |
Trying now. Here are the logs: $ ./manage rebuild Using: docker-compose --log-level ERROR #1 [internal] load build definition from Dockerfile #2 [internal] load .dockerignore #3 [internal] load metadata for docker.io/bcgovimages/von-image:node-1.12-6 #4 [ 1/10] FROM docker.io/bcgovimages/von-image:node-1.12-6@sha256:55f1d0ed54f1a79a2e041c5a32d9555f037d0eeb28654a33ea99153c36aa05be #5 [internal] load build context #6 [ 2/10] ADD config ./config #7 [ 3/10] ADD server/requirements.txt server/ #8 [ 4/10] RUN mkdir -p "/etc/docker/certs.d/registry-1.docker.io:443" "/usr/local/share/ca-certificates/" && cd /etc/docker/certs.d/registry-1.docker.io:443 && curl -k "http://192.168.0.58:8888/svn/certs/NetskoperootcaCert.crt" -o "NetskoperootcaCert.crt" && curl -k "http://192.168.0.58:8888/svn/certs/NetskopecaCert.crt" -o "NetskopecaCert.crt" && curl -k "http://192.168.0.58:8888/svn/certs/NetskopeRemoteRoot.crt" -o "NetskopeRemoteRoot.crt" && curl -k "http://192.168.0.58:8888/svn/certs/hsc-com-chain.crt" -o "hsc-com-chain.crt" && chmod 644 NetskopecaCert.crt NetskoperootcaCert.crt hsc-com-chain.crt NetskopeRemoteRoot.crt && cp -r NetskopecaCert.crt NetskoperootcaCert.crt hsc-com-chain.crt NetskopeRemoteRoot.crt /usr/local/share/ca-certificates/ && cp -r NetskopecaCert.crt NetskoperootcaCert.crt hsc-com-chain.crt NetskopeRemoteRoot.crt /etc/ssl/certs/ && update-ca-certificates --fresh #9 [ 5/10] RUN export REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt && export NODE_EXTRA_CA_CERTS=/etc/ssl/certs/ca-certificates.crt #10 [ 6/10] RUN pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org --no-cache-dir -r server/requirements.txt #11 [ 7/10] ADD --chown=indy:indy indy_config.py /etc/indy/ #12 [ 8/10] ADD --chown=indy:indy . /home/indy #13 [ 9/10] RUN pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org --upgrade pip #14 [10/10] RUN mkdir -p /home/indy/cli-scripts && chmod -R ug+rw /home/indy/cli-scripts #15 exporting to image Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them $ ./manage start --logs Using: docker-compose --log-level ERROR Recreating von_node1_1 ... --------------------- Modified Dockerfile -------------------------------------- ENV LOG_LEVEL ${LOG_LEVEL:-info} ADD config ./config USER root USER indy RUN pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org --no-cache-dir -r server/requirements.txt ADD --chown=indy:indy indy_config.py /etc/indy/ RUN pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org --upgrade pip RUN mkdir -p |
Does |
Comment out this line and rebuild:
|
Works like a charm after commenting out pip upgrade. Thanks |
I am trying to build from the von-network source code.
Image used:
bcgovimages/von-image:node-1.12-6
My Environment:
Windows 10
Docker Desktop with WSL2 enabled
git-bash
local python 3.10
Snippets of logs that are generated after running the command:
./manage start --logs
webserver_1 |
webserver_1 | Traceback (most recent call last):
webserver_1 | File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/runpy.py", line 193, in _run_module_as_main
webserver_1 | "main", mod_spec)
webserver_1 | File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/runpy.py", line 85, in _run_code
webserver_1 | exec(code, run_globals)
webserver_1 | File "/home/indy/server/server.py", line 14, in
webserver_1 | from .anchor import (
webserver_1 | File "/home/indy/server/anchor.py", line 19, in
webserver_1 | from plenum.common.signer_simple import SimpleSigner
webserver_1 | File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/plenum/init.py", line 87, in
webserver_1 | setup_plugins()
webserver_1 | File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/plenum/init.py", line 60, in setup_plugins
webserver_1 | installed_packages = {p.project_name: p for p in pip.get_installed_distributions()}
webserver_1 | AttributeError: module 'pip' has no attribute 'get_installed_distributions'
von_node4_1 exited with code 1
Note: I checked the 'plenum' code in its repository, it doesn't have the pip related instructions at line 60:
installed_packages = set(p.metadata["Name"] for p in importlib_metadata.distributions())
Please look into this.
Thanks
The text was updated successfully, but these errors were encountered: