Python Forum

Full Version: Installing sectionproperties
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, this is my first post.
I've been trying to install the software "sectionproperties", which requires Python, with instructions in the following link.
https://sectionproperties.readthedocs.io...ation.html

After trying to install several versions of Python directly and following the simple instructions, it did not work.
The furthest I got was to changing the directory, but not with the code given in that link, I think I was using "os.chdir("dir")".

Then I tried Miniconda without success. Now I've installed Anaconda which was 466MB in size. Apparently this has Python 3.7.6 in it, so I assume I don't need Python separately. Again I'm faltering at the basics, I cannot change the directory to start with.

Following this I'm supposed to install "MeshPy" and then the software "sectionproperties".

Can someone please assist with this, by actually getting it installed on their machine and advising how it was done.
For a start, what am I supposed to have installed.
I'm using Windows 7 64-bit.

Please point me in the right direction.
(Apr-09-2020, 01:25 PM)SectionProperties Wrote: [ -> ]I think I was using "os.chdir("dir")".
No, you should not do anythin in python. all installation commands are executed in cmd (Command prompt)

you download the wheel for your platform (python version and 32 or 64 bit python).
Then run pip install <path-to-wheel-you-downloaded> in the command prompt, e.g.
c:\Downloads>pip install MeshPy‑2018.2.1‑cp37‑cp37m‑win_amd64.whl
then
pip install sectionproperties, again in cmd

If you are not familiar with Command propmpt - https://www.bleepingcomputer.com/tutoria...roduction/

Note that Anaconda has its own package manager conda, so if you are going to use Anaconda, use conda instead of pip`
Thanks for responding. I did try the following in CMD.

pip install <C:\section properties\MeshPy\MeshPy-2018.2.1-cp36-cp36m-win_amd64.whl>
The error message is "The syntax of the command is incorrect".

C:\section properties\MeshPy>pip install MeshPy‑2018.2.1‑cp37‑cp37m‑win_amd64.whl
As you have it also gives an error message.
Tried many other permutations without success.

What dis you type in CMD?

What is the significance of the "$" character in the link above. I'm not an expert with CMD but have not seen this before.
pip install C:\section properties\MeshPy\MeshPy-2018.2.1-cp36-cp36m-win_amd64.whl
That is assuming the whl file is in C:\section properties\MeshPy\ folder

Output:
C:\>cd C:\section properties\MeshPy C:\section properties\MeshPy\>pip install MeshPy-2018.2.1-cp36-cp36m-win_amd64.whl
everything and including the > is the prompt


< and > a commonly used as indication for placehodler. i.e. <path-to-wheel-you-downloaded> is placeholder to be replaced.

$ indicates it's a shell command (i.e. executed in terminal or at command prompt) $ is the linux promprt, on windows is > but in docs usually they use the linux one
Sorry but I'm still getting errors.
I'm typing this in CMD, right?

With the pip code: pip is not recognized as an internal or external command, operable program or batch file

With the Output lines:
C:\ is not recognized as an internal or external command, operable program or batch file

Please try again.
(Apr-09-2020, 03:27 PM)SectionProperties Wrote: [ -> ]With the pip code: pip is not recognized as an internal or external command, operable program or batch file
That's because you don't have pip in Environment Variables Path.
Look at Python 3.8 (3.6-3.7) and pip installation under Windows.

You can also do it from root_python\Scripts folder where pip.exe is,place MeshPy-2018.2.1-cp36-cp36m-win_amd64.whl in this folder.
Here a run from start in cmd and you shall not type C:\ if not use cd(change directory).
Microsoft Windows [Version 10.0.18362.720]
(c) 2019 Microsoft Corporation. Med enerett.

C:\Users\Tom>cd\

# Cd to Scripts
C:\>cd C:\python37\Scripts

# Test pip
C:\Python37\Scripts>pip -V
pip 20.0.2 from c:\python37\lib\site-packages\pip (python 3.7)

# Install MeshPy, 64-bit for you
C:\Python37\Scripts>pip install MeshPy-2018.2.1-cp37-cp37m-win32.whl
Downloading .....
Installing collected packages: MeshPy
Successfully installed MeshPy-2018.2.1

# Install sectionproperties
C:\Python37\Scripts>pip install sectionproperties
Collecting sectionproperties
  Downloading .....
Successfully installed scipy-1.4.1 sectionproperties-1.0.5

# Test that it work cd .. one down to python37 folder
C:\Python37>python
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Inte
l)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sectionproperties.pre.sections as sections
>>> # No Error
>>> exit()

C:\Python37> 
Thank you for the comments.
Again I am truly confused. Can we please go backwards first.
(1) With the code snippets above: Is this in CMD or Python? Post #2 mentions CMD only but subsequent coding seems to have the title "Python code".
(2) Which version of Python should I have installed. In post #6, it says "Python 3.8(3.6-3.7)", which is confusing to me. The installation instructions in the link from post #6 for version 3.8 don't advise whether to "Install Now" or "Customise Installation".
(3) If it is in Python, which part of Python? Recalling my attempt last month, there was more than one part to Python when viewed on the Windows Start button, something like a powershell (I could be wrong here) and some other items, maybe similar in function, I don't know.
(4) As mentioned in the original post, I have Anaconda installed (Anaconda Navigator 1.9.12, 466MB for 64-bit Windows). This was recommended by the developer during contact last month, although Anaconda is not mentioned in the instructions link from the developer. Anaconda seems to have Python installed, there is "python 3.7.6" with a small "p" in the Environments section of Anaconda.

Because I don't know anything about Python or Anaconda, or their relationship to each other, or what they're supposed to do, I really need specific instructions.

I can just tell that if I have Anaconda (with python) installed and install another application directly from Python.org, it will just mess everything up. Given the developer has recommended Anaconda, maybe this is the way to go. And to complicate things even further, there seems to be different types of this application (Anaconda, Conda, Miniconda) ... it's just getting too much.

So please tell me what I need installed first, then please give more specific instructions for someone who's doesn't have a coding background.
After many trials, I may have installed MeshPy now.
I don't know how the errors were resolved, maybe it was relating to the "pip" command.

The newer versions of Python would not accept the MeshPy wheel. So after uninstalling and installing an older version of Python (3.6.0) it seems to work.

It was done with the Command Prompt.

Thanks for your efforts, this single step has been a Project with a capital "P".