Skip to content
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

Installing OpenFL from develop doesn't work #672

Closed
DL8 opened this issue Jan 4, 2023 · 4 comments
Closed

Installing OpenFL from develop doesn't work #672

DL8 opened this issue Jan 4, 2023 · 4 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@DL8
Copy link
Contributor

DL8 commented Jan 4, 2023

Describe the bug
fx command fails with the following after installing OpenFL from repo:

$ fx
Traceback (most recent call last):
  File "/home/vmuser/venv_test/bin/fx", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/home/vmuser/venv_test/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3252, in <module>
    def _initialize_master_working_set():
  File "/home/vmuser/venv_test/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3235, in _call_aside
    f(*args, **kwargs)
  File "/home/vmuser/venv_test/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/home/vmuser/venv_test/lib/python3.8/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/home/vmuser/venv_test/lib/python3.8/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/home/vmuser/venv_test/lib/python3.8/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'jsonpointer>1.13; extra == "format-nongpl"' distribution was not found and is required by jsonschema

A second installation on the same environment fixes this issue, but it's not very elegant to demand invoking pip install twice

To Reproduce

python -m venv venv_test
. venv_test/bin/activate
git clone https://github.com/intel/openfl.git
pip install ./openfl
fx

Expected behavior
fx runs without dependency errors

@MasterSkepticista
Copy link
Collaborator

MasterSkepticista commented Jan 5, 2023

Could you mention the pip version?
Besides, it is generally recommended to upgrade pip, setuptools and wheel before installing packages in a new virtual environment.
You may give this a try (in a fresh venv):

python -m venv venv_test
. venv_test/bin/activate
# Upgrade base package helpers
python -m pip install -U pip setuptools wheel
git clone https://github.com/intel/openfl.git
pip install ./openfl
fx

@DL8
Copy link
Contributor Author

DL8 commented Jan 5, 2023

Python version:

$ python --version
Python 3.8.10

Pip version (from system):

$ pip --version
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)

Pip version (after upgrade in the venv):

$ pip --version
pip 22.3.1 from /home/vmuser/venv_test/lib/python3.8/site-packages/pip (python 3.8)

I tried the flow you suggested and it worked. I believe this recommendation should be added to the documentation

@MasterSkepticista
Copy link
Collaborator

Glad to know it worked. We'll include this in our documentation for clarity.

@MasterSkepticista MasterSkepticista self-assigned this Jan 5, 2023
@MasterSkepticista MasterSkepticista added the documentation Improvements or additions to documentation label Jan 5, 2023
@MasterSkepticista
Copy link
Collaborator

Documentation updated. Marking this as closed.

DL8 added a commit to DL8/openfl that referenced this issue Jan 17, 2023
Per fix for securefederatedai#672, seup documentation was updated to upgrade pip,
setuptools and wheel. Align base Dockerfile used in graminize to reflect
this change

Signed-off-by: Lavi, Nir <nir.lavi@intel.com>
psfoley pushed a commit that referenced this issue Jan 24, 2023
Per fix for #672, seup documentation was updated to upgrade pip,
setuptools and wheel. Align base Dockerfile used in graminize to reflect
this change

Signed-off-by: Lavi, Nir <nir.lavi@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants