Closed mayermelhem closed 2 years ago
What version of Python are you running? Pip should install a wheel from PyPi, if available for you platform. That said, it looks like there are no wheels for Python 3.9+ and PyPi for triangle.
@robbievanleeuwen we may need to see if we can add a PR to triangle to get wheels for never versions of python added...
@mayermelhem please note also that the latest version of section properties on PyPi is version 2.0 which has man breaking changes compared to the 1.0 series. You can still use the older 1.0 series, if needed, by adding a <2 requirements with pip. Note that the 1.0 series depends on meshpy instead of triangle, but that it requires the free MS build libraries too.
Ah sorry for not mentioning earlier @Spectre5. Running python 3.9.7. I had an older version of python in my work computer and the older sectionproperties too, but since then I have lost access to the work computer and am porting things over on a brand new person laptop. Version 2.0 has come out in perfect time. It is not a rush to get it on this computer yet.
Hi @mayermelhem I can reproduce this issue on my pc with anaconda and python 3.9.
When creating a virutal environment with python 3.7 & 3.8 I don't have this issue. For now I would suggest running sectionproperties on anaconda with windows, with either python 3.7 or 3.8 if possible, e.g.:
conda create --name pyenv python=3.8
conda activate pyenv
pip install sectionproperties
As @Spectre5 points out, it looks like there aren't any triangle wheels uploaded for python 3.9 yet, see drufat/triangle#57. There is currently a PR that appears to address this (drufat/triangle#58) so hopefully this will be remedied shortly!
In the meantime, @stefsmeets has kindly provided a wide variety of triangle wheels (up to python 3.10) here.
Thanks so much for your quick response @Spectre5 and @robbievanleeuwen. I have downloaded the triangle wheel from @stefsmeets and we are working now! Looking forward to play around with version 2.0.
Hi all,
I am a new user of section preperties and I have just had the same issue(got the same error when installing triangle). I then solved the installation issue by installing Microsoft C++ Build Tools. However, when I import triangle I get the following error:
`import triangle Traceback (most recent call last):
File "C:\Users\Angel\AppData\Local\Temp/ipykernel_5688/3401576549.py", line 1, in
File "C:\Users\Angel\Documents\WORK\test\triangle__init__.py", line 13, in
File "C:\Users\Angel\Documents\WORK\test\triangle\tri.py", line 1, in
ModuleNotFoundError: No module named 'triangle.core'`
I am using anaconda and python 3.9 so I have downloaded and installed triangle-20200804-cp39-cp39-win_amd64.whl but I still get the same error when importing the package. Have you ever experienced this issue?
Many thanks in advance!
Hi @AnRuVi, sorry I am away from home this weekend and don't have access to my PC.
Did you install the triangle wheel with pip?
I would try:
conda create --name pyenv python=3.9
conda activate pyenv
pip install triangle-20200804-cp39...
pip install sectionproperties
If this doesn't work, does it work in python 3.8?
Hi @robbievanleeuwen , first of al thanks for your quick reply! I first tried that on python 3.9 but I got the same issue when importing. Then tried in python 3.8 and works fine now!
Fixed with drufat/triangle#58, I can no longer produce this issue on my PC with anaconda & python 3.9.
Hi all,
I have previously used
sectionproperties
for my work computer, but now I am trying to install on a personal computer.When I run
pip install sectionproperties
, the dependencies seem to work out okay, except fortriangle
. A copy-paste of error text below, but essentially it appears that Microsoft Visual C++ 14.0 or later is necessary. Please confirm if this is an additional requirement.Desktop