Giter VIP home page Giter VIP logo

Comments (4)

eo1989 avatar eo1989 commented on July 24, 2024

Yeah running the cells in the chapter 1 Jupyter notebooks does the same for me. pip3 search doesn't find anything named modsim, and thus trying to pip3 install modsim just returns errors. running python setup.py install within the cloned repo, even creating a new virtualenv just for that directory, didnt help. the notebooks still state theres no module named modsim. ¯_(ツ)_/¯

from modsimpy.

tdatu avatar tdatu commented on July 24, 2024

Yeah running the cells in the chapter 1 Jupyter notebooks does the same for me. pip3 search doesn't find anything named modsim, and thus trying to pip3 install modsim just returns errors. running python setup.py install within the cloned repo, even creating a new virtualenv just for that directory, didnt help. the notebooks still state theres no module named modsim. ¯_(ツ)_/¯

modsim was installed in my system in this directory:
/Users//Library/Python//lib/python/site-packages/

However, I also encounter some runtime errors when opening chapter2 notebook. Then I opened python3 interactive shell, then imported modsim. This is the error that I got:
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/linecache.py", line 48, in getlines for mod in sys.modules.values(): RuntimeError: dictionary changed size during iteration

from modsimpy.

gerdis avatar gerdis commented on July 24, 2024

After following the installation instructions, I did import modsim and got the following errors (differentiated by Python 2.7 & 3.6). I'm running these on Anaconda 4.7.5

Python 3.6

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\hsamuel\AppData\Local\Continuum\anaconda2\envs\py36\lib\site-packages\modsim\__init__.py", line 1, in <module> from .modsim import * File "C:\Users\hsamuel\AppData\Local\Continuum\anaconda2\envs\py36\lib\site-packages\modsim\modsim.py", line 38, in <module> from pint.errors import UnitStrippedWarning ImportError: cannot import name 'UnitStrippedWarning'

Python 2.7

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\hsamuel\AppData\Local\Continuum\anaconda2\lib\site-packages\modsim\__init__.py", line 1, in <module> from .modsim import * File "C:\Users\hsamuel\AppData\Local\Continuum\anaconda2\lib\site-packages\modsim\modsim.py", line 1668 def Vector(*args, units=None): ^ SyntaxError: invalid syntax

When using modsim in Python 2.7, the issue seems to be the order of the arguments in the function header in line 1668 (default argument has to come before *args).

from modsimpy.

AllenDowney avatar AllenDowney commented on July 24, 2024

Since many people have had problems with this, I have simplified things for Version 4. Instead of installing the ModSim library, the notebooks are set up to download modsim.py if needed. Also, the notebooks work on Colab now, so people can run them in a browser without installing anything. Hopefully, that will make it easier to get started.

from modsimpy.

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.