calculix / cae

CalculiX Advanced Environment is designed to guide you through the CalculiX keywords creation process and is aimed to help you reach the correct input file with no mistakes.
GNU General Public License v3.0
143 stars 34 forks source link

Fail to start in Ubuntu 20.04 & Anaconda Env #10

Closed dymaxionkim closed 4 years ago

dymaxionkim commented 4 years ago

Hello, I tried 'cae' package in my desktop, but I failed to start.

Response is like that :

$ sh cae.sh
Binary does not exist. Running source code.
cae.sh: 13: exec: /home/osboxes/Calculix/cae/src/cae.py: Permission denied
$ python3 ./src/cae.py
Please, install PyQt5 with command:
pip3 install PyQt5
$ pip3 install PyQt5
Requirement already satisfied: PyQt5 in ~/.pyenv/versions/anaconda3-2020.02/lib/python3.7/site-packages (5.15.0)
Requirement already satisfied: PyQt5-sip<13,>=12.8 in ~/.pyenv/versions/anaconda3-2020.02/lib/python3.7/site-packages (from PyQt5) (12.8.0)

I cannot understand why...
Please check this, or Let me know the environment in which it's running!

imirzov commented 4 years ago

Hello,

Thank you for testing the app! I'm using Ubuntu 18.04 LTS with default Gnome. Please, pay attention, that in Linux CAE needs Xlib to be installed. Read how-to-use CAE I'm not sure it will work in i3-gaps.

You are running sources. Latest commit is OK and works much better than release version. Download here.

cae.sh: 13: exec: /home/osboxes/Calculix/cae/src/cae.py: Permission denied Suppose, it means that you haven't granted permissions for execution to all CAE's files. Change dir to CAE and run: sudo chmod -R +x ./* or sudo chmod -R 777 ./* At minimum cae.sh should be executable.

Please, install PyQt5 with command... cae.py and other sources have code:

try:
    from PyQt5 import QtWidgets
except:
    msg = 'Please, install PyQt5 with command:\n'\
        + 'pip3 install PyQt5'
    sys.exit(msg)

So looks like your python can't import QtWidgets from PyQt5. Just create python file with only one row: from PyQt5 import QtWidgets and test it with your python3. It must work.

Also I'm using normal python 3.6 installation - no Anaconda. Hope, this will help. Please, keep me informed.

dymaxionkim commented 4 years ago

Thank you for your kind reply. I succeeded thanks to your advice. There were two causes of failure.

  1. anaconda3-2020.02 (Python 3.7.7) (This may not causes of failure)
  2. Separately Installed Qt 5.14

So I could solve it as follows.

*** Installing by git clone ***
mkdir ~/Calculix
cd ~/Calculix
git clone https://github.com/calculix/cae.git
cd ~/Calculix/cae
sudo chmod -R +x ./*

*** Python 3.6 in Pyenv environment  ***
pyenv install 3.6.10
pyenv global 3.6.10
pip install --upgrade pip

*** Installation of dependencies ***
cd ~/Calculix/cae
pip3 install -r requirements.txt

*** Unset separately Installed Qt 5.14 ***
unset LD_LIBRARY_PATH

*** Run ***
./cae.sh

Now it works very well.

20200724_164831_1920x1200

I'll try your great work now... Thank you again!