Coder Social home page Coder Social logo

Bug with Mac about anylogic-pypeline HOT 6 CLOSED

t-wolfeadam avatar t-wolfeadam commented on June 16, 2024
Bug with Mac

from anylogic-pypeline.

Comments (6)

t-wolfeadam avatar t-wolfeadam commented on June 16, 2024

It seems like you're trying to programmatically create the Python Communicator agent? If you can share your model, it would help in troubleshooting.

from anylogic-pypeline.

mgaury avatar mgaury commented on June 16, 2024

Thank you for your quick reply.
The model I try to run is the Simple Hospital (AI Tested) from the exemples.

from anylogic-pypeline.

mgaury avatar mgaury commented on June 16, 2024

When I try to use python3, I get this error :
Error during model startup:
root.pyCom:
ModuleNotFoundError("No module named 'numpy'")java.lang.RuntimeException:

from anylogic-pypeline.

t-wolfeadam avatar t-wolfeadam commented on June 16, 2024

Ah right, I see what the problem is now. Macs have Python 2 installed by default, so if you initialize the PyCommunicator with the default python, that's what it uses, and Pypeline does not support Python 2.

Your update fixes to use Python 3 but as the error suggests, you're missing the numpy library, so you'll need to install that (and any other dependencies mentioned by the model). The simplest way that usually works is doing the following in a terminal: python3 -m pip install <library> (replacing "<library>" with the library name)

from anylogic-pypeline.

mgaury avatar mgaury commented on June 16, 2024

Thank you for your reply.
The thing is I already installed this package
(python3 -m pip install numpy
Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (1.19.5)).

This is why I don't understand. Does it need a special env to run ?

from anylogic-pypeline.

t-wolfeadam avatar t-wolfeadam commented on June 16, 2024

Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (1.19.5))

There might be a weird path issue happening related to you being on a Mac (I admittedly haven't extensively tested Pypeline on it).

Try creating a new model and following the instructions listed on the Wiki's Setup page but configure it to use the "python3" command. Make sure the path it shows is similar to the mentioned one. If it's not, let me know what it is

from anylogic-pypeline.

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.