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

Ocean.py doesn't work properly with anaconda #1203

Open
LoznianuAnamaria opened this issue Dec 13, 2022 · 10 comments
Open

Ocean.py doesn't work properly with anaconda #1203

LoznianuAnamaria opened this issue Dec 13, 2022 · 10 comments
Assignees
Labels
Priority: Low Priority: Mid Status: Blocked Blocked by dependency, platform requirement, etc (add comment to detail the reason) Type: Enhancement New feature or request

Comments

@LoznianuAnamaria
Copy link
Contributor

Feedback from one of the Predict-ETH participant:

'Furthermore my computer was set up to work with anaconda not venv, and wasn’t keen on using venv because that’ll be using one py env on top of another. I had errors trying to connect brownie to the polygon network via conda and jupyter notebook. Thus in the end I used my conda env to create the predictions, but created one python script with all the code from step 4 onwards + helper functions to upload results.'

@LoznianuAnamaria LoznianuAnamaria added the Type: Enhancement New feature or request label Dec 13, 2022
@LoznianuAnamaria
Copy link
Contributor Author

cc @trentmc

@trentmc
Copy link
Member

trentmc commented Dec 13, 2022

I'm really happy that we got this feedback. Anaconda is the most widely-used python distribution / package manager for data science. It will be great if we support it well. (And, our friends at Anaconda Inc will be happy:)

@calina-c
Copy link
Contributor

calina-c commented Jan 6, 2023

I've worked on this a lot yesterday, here is a summary of my work:

  • in order to make ocean.py compatible with Anaconda, we first have to make ocean-contracts, our main dependency, compatible with Anaconda.

A) Publishing ocean-contracts on Anaconda

  • context: I managed to publish to a private channel here: https://anaconda.org/oceanprotocol/ocean-contracts. This means our package is now available using the command conda install -c oceanprotocol ocean-contracts
  • context: However, in order for the dependency to be completely satisfied, we want to publish it as a main dependency, part of the Conda Forge package, where it would be available for usage using simply conda install ocean-contracts. This is done via publishing the build recipe and license to the conda forge repository here: Adds recipe for ocean-contracts. conda-forge/staged-recipes#21660.
  • ACTION REQUIRED I have created the PR and added oceanprotocol as the maintainer of the recipe. I can only ping the reviewers from Conda once someone from oceanprotocol comments that they are ok with maintaining the recipe (see the checkboxes in the PR itself). I suggested @alexcos20 since Trent is on holiday.
  • TODO: after consent from oceanprotocol, we need to ping the review team and wait for their approval

B) Publishing ocean-lib on Anaconda

  • context: unfortunately, even after we satisfy the requirement for ocean-contracts, there are still other dependencies that are not published on Anaconda. These are:
    • json-sempai -> we can possibly change this dependency, find something similar
    • eciespy -> it doesn't seem like they have plans to publish on Anaconda soon. We can not use another dependency in this case.
    • eth-brownie -> there is an older issue for adding a Brownie conda recipe here. I commented with details there as well. There is just one missing dependency that would make this possible, but I'm not holding my breath :)
  • ACTION REQUIRED: I can not progress with this task at least until eth-brownie is available as a conda package. Should I devote time and energy into making these changes happen with the help of the open source community? How important is this issue for ocean.py conda compatibility and should I pursue it further?

C) Automation?

  • at some point, we will have to automate the building process, but I do not think it is time to discuss that yet, since we still have trouble making it happen in the first place. However, I want to take note of this step later.

@trentmc
Copy link
Member

trentmc commented Jan 7, 2023

This is an excellent report, Calina.

json-sempai -> we can possibly change this dependency, find something similar

I recently started getting messages that this will be deprecated soon (by python 3.12?). It suggested a replacement package, but I forget which. I recommend that we create a separate github issue to switch dependency from this package to the recommended replacement.

I can not progress with this task at least until eth-brownie is available as a conda package.

So far I have personally heard of just one user that really wanted to use anaconda, as part of predict-eth. So it's not urgent per se.

However, if is important: a huge chunk of the python data science community uses anaconda, and I'd love to make it easy for them to start having web3 data management capabilities (aka Ocean) as part of their work flows.

Therefore my suggestion is: keep gently nudging at this to nurture it along.

@LoznianuAnamaria LoznianuAnamaria added the Status: Blocked Blocked by dependency, platform requirement, etc (add comment to detail the reason) label Jan 10, 2023
@calina-c calina-c changed the title Ocean.py doesn't work propertly with anaconda Ocean.py doesn't work properly with anaconda Feb 17, 2023
@graceful-coder
Copy link
Contributor

graceful-coder commented Mar 6, 2023

Ocean-lib may not work when using a version of Python installed on the machine via Anaconda.

I had Python 3.9.12 installed on my Mac M1 machine via Anaconda, and I could not import the ocean.py library using the python console inside a python3 venv. Normally, this version of Python would be within the dependency versions of Python for ocean-lib. (Note that this is uniquely different from using a conda virtual environment.)

#1352 (comment)

@trentmc
Copy link
Member

trentmc commented Mar 7, 2023

Veronica: Found issues of ocean.py with both:

  • conda package manager
  • python version installed within python

@graceful-coder please add more details (or link to the issue you reported this)

@graceful-coder
Copy link
Contributor

Please see Issue #1352

@trentmc
Copy link
Member

trentmc commented Mar 14, 2023

@calina-c had brought up this - with a request involved

[@calina-c wrote] context: However, in order for the dependency to be completely satisfied, we want to publish it as a main dependency, part of the Conda Forge package, where it would be available for usage using simply conda install ocean-contracts. This is done via publishing the build recipe and license to the conda forge repository here: Adds recipe for ocean-contracts. conda-forge/staged-recipes#21660.
TODO: after consent from oceanprotocol, we need to ping the review team and wait for their approval

@calina-c - what is the specific action, please, and how can I help, specifically?

@calina-c
Copy link
Contributor

calina-c commented Apr 7, 2023

Updates:

  • the ocean-contracts recipe has been approved with me as a maintainer
  • the only pending dependencies for the ocean-lib conda recipe are eciespy and eth-brownie. I haven't heard back from brownie in a couple of months on this issue, so I commented again on the issue Add conda-forge recipe eth-brownie/brownie#902

@calina-c
Copy link
Contributor

Latest report: after removing eth-brownie, the only conda package missing from our dependencies is eciespy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Low Priority: Mid Status: Blocked Blocked by dependency, platform requirement, etc (add comment to detail the reason) Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants