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-lib may not work when using a version of Python installed on the machine via Anaconda #1352

Closed
graceful-coder opened this issue Mar 3, 2023 · 12 comments
Assignees
Labels
Type: Bug Something isn't working

Comments

@graceful-coder
Copy link
Contributor

Describe the bug
Cannot import connect_to_network module when following the setup-local.md instructions on Mac M1.

To Reproduce
Steps to reproduce the behavior:
1. Go to setup-local.md README
2. Follow the steps 1-4 on a Mac or Windows
3. See error on 4th step

Expected behavior
No python errors when setting up Alice and Bob in python with ETH and OCEAN.

Desktop (please complete the following information):

  • OS: MacOS Ventura

Screenshots
bug

Additional context
Add any other context about the problem here.

@graceful-coder graceful-coder added the Type: Bug Something isn't working label Mar 3, 2023
@graceful-coder
Copy link
Contributor Author

@mariacarmina @calina-c Tagging you here because I do not have the permissions yet to assign this issue directly to you.

@graceful-coder graceful-coder changed the title Setup-local.md does not support MacOS or Windows Yet Setup-local.md does not support MacOS or Windows Yet [URGENT] Mar 3, 2023
@mariacarmina
Copy link
Member

I don't think is due to ocean-lib and it seems to come from your python setup. I have searched the problem a bit and found an answer here. It seems that mixes Python 2 with Python 3.

@graceful-coder
Copy link
Contributor Author

As a user, I shouldn't have to update my main_wrapper.c file on my machine to run ocean-lib properly. Here is a screen recording to show my installation process from the readmes and the import failure.

@mariacarmina
Copy link
Member

There is a problem related on how did you manage to install python on your machine. It's a Python version issue that you have encountered, not an ocean-lib issue.

@graceful-coder
Copy link
Contributor Author

So what you're saying is that I can't run Ocean-lib with Python 3.9.12 as installed by Anaconda?

@mariacarmina
Copy link
Member

Anaconda is not yet fully supported, check in install.md https://github.com/oceanprotocol/ocean.py/blob/main/READMEs/install.md#install-oceanpy-library. The comment right above python3 -m venv venv. So if the python is installed by Anaconda, maybe that's why you are facing these issues.

@graceful-coder
Copy link
Contributor Author

It shouldn't be a problem with Python 3.9.12 being installed by Anaconda... That comment refers to not being able to use a conda virtual environment. Either way, I will go through uninstalling python entirely on my system and install an old version of python to try to get this working. Will report back.

@graceful-coder
Copy link
Contributor Author

Resolved by installing Python 3.10.4.

Takeaway: Cannot use either conda virtual environment, nor even a Python install by Anaconda with ocean-lib.

@graceful-coder graceful-coder changed the title Setup-local.md does not support MacOS or Windows Yet [URGENT] Ocean-lib may not work when using a version of Python installed on the machine via Anaconda Mar 8, 2023
@graceful-coder graceful-coder reopened this Mar 8, 2023
@ChristianCasazza
Copy link

I got the following import error message after setting up my virtual enviornment and installing ocean-lib. I am using Windows.

ImportError: cannot import name 'Accounts' from partially initialized module 'brownie.network.account' (most likely due to a circular import) (C:\Users\Chris\oceanpy\venv\lib\site-packages\brownie\network\account.py)

@mariacarmina
Copy link
Member

mariacarmina commented Mar 24, 2023

@calina-c has a PR on anaconda project and this issue seems related to #1203. I'll also assign @calina-c on this one since she had som workaround on this topic.

@calina-c
Copy link
Contributor

@graceful-coder it seems from your comment the issue was solved?
@ChristianCasazza it looks like your issue is unrelated to Anaconda. Could we create a separate issue for your last comment? I'll help you debug it but let's set clear scopes.

@mariacarmina mariacarmina removed their assignment Apr 13, 2023
@calina-c
Copy link
Contributor

Closing as discussed on Slack with Christian.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants