Coder Social home page Coder Social logo

matmodlab2 installation about matmodlab2 HOT 21 OPEN

matmodlab avatar matmodlab commented on August 30, 2024
matmodlab2 installation

from matmodlab2.

Comments (21)

tjfulle avatar tjfulle commented on August 30, 2024 1

Thanks @Qalkaseasbeh for the questions/feedbacks!

At its heart, matmodlab2 is just a python package. So, "installation" can be as easy as cloning the repository to wherever you like and adding the directory to the PYTHONPATH environment variable. For example, suppose you clone (or download and unzip) matmodlab2 to /home/user/Documents/matmodlab2, then in your bash shell just do:

export PYTHONPATH=/home/user/Documents/matmodlab2

or in csh

setenv PYTHONPATH /home/user/Documents/matmodlab2

On windows, you have to go to

Computer > Properties > Advanced system settings > Environment Variables

and then edit or add the path to matmodlab2 to the PYTHONPATH. See How do I set or change the PATH system variable? for more details.

Note: Inside of the matmodlab2 directory that is cloned is another directory named matmodlab2 as well. The PYTHONPATH must be set to the first matmodlab2 directory as shown above and not /home/user/Documents/matmodlab2/matmodlab2.

I prefer to work in a terminal environment, but I believe that most python IDE's (like Spyder) allow you to set the working directory or PYTHONPATH directly in their settings.

To get a start with matmodlab2, I highly recommend (after setting the PYTHONPATH) looking at the notebooks in matmodlab2/notebooks. To look at the notebooks, you need to have Jupyter notebook installed. The notebooks are live tutorials of how to use matmodlab2 and there are many examples of material models. There is also a notebook on writing Abaqus UMATs. If you don't have Jupyter installed, I highly recommend installing Anaconda and using their python distribution. It's just not worth the pain of getting all of the Python dependencies and Jupyter and Spyder and ... installed. Let the Anaconda team do that for you. The Anaconda Launcher program can launch Jupyter notebooks and Spyder IDE sessions. If you don't have Jupyter, the notebooks can be viewed directly on github.

from matmodlab2.

tjfulle avatar tjfulle commented on August 30, 2024 1

Yes, you can use that version. I have made updates to the notebooks in the last two days, so you may want to download a newer version

from matmodlab2.

sswan avatar sswan commented on August 30, 2024

It should be enough to download the zip file, unzip it, then set your working directory to the extracted folder. There is no need to install, so long as your working directory includes the matmodlab2 directory.

from matmodlab2.

Qalkaseasbeh avatar Qalkaseasbeh commented on August 30, 2024

You mean Python directory (working directory), right?

from matmodlab2.

sswan avatar sswan commented on August 30, 2024

Yes, the PYTHONPATH.

from matmodlab2.

Qalkaseasbeh avatar Qalkaseasbeh commented on August 30, 2024

Would you mind telling how I can do that?

from matmodlab2.

sswan avatar sswan commented on August 30, 2024

Without knowing your specific setup, your best best would be to follow the instructions at this website:

http://stackoverflow.com/questions/3701646/how-to-add-to-the-pythonpath-in-windows-7

However, if you are using an IDE (such as Canopy) there is an option to set the working directory (which is slightly different from the PYTHONPATH, but would do the same thing for you).

from matmodlab2.

Qalkaseasbeh avatar Qalkaseasbeh commented on August 30, 2024

Thanks a lot for your help. Let me try with this.

from matmodlab2.

tjfulle avatar tjfulle commented on August 30, 2024

@Qalkaseasbeh, I would also recommend cloning and not downloading - I push through changes often and by cloning you can easily pull down the changes.

from matmodlab2.

Qalkaseasbeh avatar Qalkaseasbeh commented on August 30, 2024

Thanks a lot for your deep explanation.

I did add the path to matmodlab2 to the PYTHONPATH, but How can I check it's done perfectly?
In the second comment, you said " I would also recommend cloning and not downloading", and I wanna keep updated with changes you make, but how can I do that?

I did download ANACONDA. I'm totally new for all these stuff and I'll follow your recommendations to start.

Once again, Thank you.

from matmodlab2.

tjfulle avatar tjfulle commented on August 30, 2024

@Qalkaseasbeh said

I did add the path to matmodlab2 to the PYTHONPATH, but How can I check it's done perfectly?

I did download ANACONDA. I'm totally new for all these stuff and I'll follow your recommendations to start.

So, open the Anaconda Launcher application, launch the QT Console app and execute

import sys
print(sys.path)

If you don't see the Matmodlab2 path in the resultant list, you did not do it right.

In the second comment, you said " I would also recommend cloning and not downloading", and I wanna keep updated with changes you make, but how can I do that?

Google "how to set up git on windows". After getting it set up, launch the git bash console and

cd <path where you want matmodlab>
git clone https://www.github.com/matmodlab/matmodlab2 

Make sure this path is in your PYTHONPATH.

I'd then go through the Matmodlab2 tutorials with the Jupyter notebook app that is bundled with Anaconda.

from matmodlab2.

Qalkaseasbeh avatar Qalkaseasbeh commented on August 30, 2024

I did what you recommended:

1- So, open the Anaconda Launcher application, launch the QT Console app and execute

import sys
print(sys.path)

Me: I see the path where I downloaded matmodlab2 ('C:\Users\qusay.alkaseasbeh\Documents') as attached in picture.

capture

2- Google "how to set up git on windows". After getting it set up, launch the git bash console and

cd
git clone https://www.github.com/matmodlab/matmodlab2
Make sure this path is in your PYTHONPATH.

Me: I did, but It didn't accept the path. see the attached please.
git

from matmodlab2.

tjfulle avatar tjfulle commented on August 30, 2024

The error is pretty clear - you already have a directory named matmodlab2 in that directory. You'll have to change its name or remove it before cloning

from matmodlab2.

Qalkaseasbeh avatar Qalkaseasbeh commented on August 30, 2024

Yeah, there is unzip file in this folder ('C:\Users\qusay.alkaseasbeh\Documents'), but it doesn't accept any path doesn't have this unzip file.

Queation: since I got done with first method, could I start studying the examples?

Sorry for disturbing

from matmodlab2.

Qalkaseasbeh avatar Qalkaseasbeh commented on August 30, 2024

I think everything looks good now, right? Taylor (Technical support at UND) helped me to get this stage.

Thanks a lot tjfulle for the time you spent to help me yesterday.

capture
git

from matmodlab2.

Qalkaseasbeh avatar Qalkaseasbeh commented on August 30, 2024

Hello,

I've started practicing some examples but I'm running into this issue (attached). Could you help please?
capture

from matmodlab2.

tjfulle avatar tjfulle commented on August 30, 2024

Your PYTHONPATH is probably incorrect. See our previous conversations.

from matmodlab2.

Qalkaseasbeh avatar Qalkaseasbeh commented on August 30, 2024

I checked it with (import sys, print(sys.path) and it's supposed to be okay (I attached what I got 4 days ago).

from matmodlab2.

tjfulle avatar tjfulle commented on August 30, 2024

matmodlab2 is just a python package, so if your PYTHONPATH is correct, it will load. You can try launching the terminal session from the matmodlab2 directory. Or, see if you can set the PYTHONPATH from the QT console's preferences. I've never used the Jupyter console, but that's what I would do to start.

from matmodlab2.

Qalkaseasbeh avatar Qalkaseasbeh commented on August 30, 2024

" You can try launching the terminal session from the matmodlab2 directory" How can I do it?

from matmodlab2.

tjfulle avatar tjfulle commented on August 30, 2024

I believe you make a shortcut to the app and then change the properties of the shortcut to launch where you want. I'm not a windows user, that's about all I know.

The best thing to do is figure out why Matmodlab2 is not being imported.

from matmodlab2.

Related Issues (15)

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.