Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render 2024.7.4 error code after FC program start #435

Open
MakerFC opened this issue Aug 3, 2024 · 12 comments
Open

Render 2024.7.4 error code after FC program start #435

MakerFC opened this issue Aug 3, 2024 · 12 comments

Comments

@MakerFC
Copy link

MakerFC commented Aug 3, 2024

11:38:02  [Render][Init] Checking dependencies...
11:38:02  [Render][Init] >>> Environment folder does not exist - Creating

11:38:03  [Render][Init] Virtual environment error
11:38:03  Traceback (most recent call last):
11:38:03    File "/home/user/.local/share/FreeCAD/Mod/Render/./Render/rdrexecutor.py", line 160, in run
    res = self.func(*self.args)
          ^^^^^^^^^^^^^^^^^^^^^
11:38:03    File "/home/user/.local/share/FreeCAD/Mod/Render/./Render/virtualenv.py", line 89, in rendervenv_worker
    _create_virtualenv()
11:38:03    File "/home/user/.local/share/FreeCAD/Mod/Render/./Render/virtualenv.py", line 354, in _create_virtualenv
    subprocess.run(
11:38:03    File "/tmp/.mount_FreeCApVhZwd/usr/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
11:38:03  subprocess.CalledProcessError: Command '['/usr/bin/python3', '-I', '-u', '/tmp/tmpclvmjwen/virtualenv.pyz', '/home/user/.local/share/FreeCAD/.rendervenv']' returned non-zero exit status 1.
11:38:03

OS: openSUSE Leap 15.5 (KDE//usr/share/xsessions/default)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.38385 (Git) AppImage
Build type: Release
Branch: main
Hash: 58241e027e7187a1ecaeeb75668ef9a497437c68
Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale:
Installed mods:

  • sheetmetal 0.4.19
  • Render 2024.7.4
  • Assembly3 0.12.2
  • A2plus 0.4.65
  • Defeaturing 1.2.2
  • fasteners 0.5.24
  • Curves 0.6.39
@howetuft
Copy link
Collaborator

howetuft commented Aug 3, 2024

Hello,

Could you please do the following:

  1. Download virtualenv bootstrap here: https://bootstrap.pypa.io/virtualenv.pyz

  2. Run the following in a terminal:

/usr/bin/python3 -I -u /path/to/virtualenv.pyz /home/user/.local/share/FreeCAD/.rendervenv

and send me the result?

@MakerFC
Copy link
Author

MakerFC commented Aug 3, 2024

Hi howetuft,

as desired here comes the (un)desired result: :-)

Traceback (most recent call last):
  File "/usr/lib64/python3.6/runpy.py", line 185, in _run_module_as_main
    mod_name, mod_spec, code = _get_main_module_details(_Error)
  File "/usr/lib64/python3.6/runpy.py", line 219, in _get_main_module_details
    return _get_module_details(main_name)
  File "/usr/lib64/python3.6/runpy.py", line 128, in _get_module_details
    spec = importlib.util.find_spec(mod_name)
  File "/usr/lib64/python3.6/importlib/util.py", line 91, in find_spec
    return _find_spec(fullname, None)
  File "<frozen importlib._bootstrap>", line 894, in _find_spec
  File "<frozen importlib._bootstrap_external>", line 1157, in find_spec
  File "<frozen importlib._bootstrap_external>", line 1131, in _get_spec
  File "<frozen importlib._bootstrap_external>", line 1112, in _legacy_get_spec
  File "<frozen importlib._bootstrap>", line 441, in spec_from_loader
  File "<frozen importlib._bootstrap_external>", line 544, in spec_from_file_location
  File "/home/mick/FreeCAD/FC_Render/virtualenv.pyz/__main__.py", line 1
SyntaxError: future feature annotations is not defined

@MakerFC MakerFC closed this as completed Aug 3, 2024
@howetuft
Copy link
Collaborator

howetuft commented Aug 3, 2024

Hello,
You closed the issue as completed, is it intentional?
Concerning the exception, there's a mess between 2 versions of Python (3.11 and 3.6). Would you know the reason why there would be those 2 versions on your system?

@howetuft
Copy link
Collaborator

howetuft commented Aug 3, 2024

It may also be related to #431

@MakerFC
Copy link
Author

MakerFC commented Aug 3, 2024

Hi howetuft,

Oh, I didn't want to close the point. The problem still exists.
As far as I know, the mix of different python versions on openSUSE systems is usual.
The openSUSE world is characterised by a strange mix of old and current software.
Completely incomprehensible is the ancient Python version 3.6 (current would be 3.11).

My openSUSE Leap 15.5 System shows completely different versions:

  $ ls -al /usr/bin/pytho*
lrwxrwxrwx 1 root root     9 19. Mai 20:27 /usr/bin/python -> python2.7
lrwxrwxrwx 1 root root     9 19. Mai 20:27 /usr/bin/python2 -> python2.7
-rwxr-xr-x 1 root root  6280 19. Mai 20:27 /usr/bin/python2.7
lrwxrwxrwx 1 root root     9 28. Jun 12:01 /usr/bin/python3 -> python3.6
-rwxr-xr-x 1 root root  6392 28. Jun 11:53 /usr/bin/python3.10
-rwxr-xr-x 1 root root  6392 28. Jun 11:58 /usr/bin/python3.11
-rwxr-xr-x 2 root root 10560 28. Jun 12:01 /usr/bin/python3.6
lrwxrwxrwx 1 root root    17 28. Jun 12:01 /usr/bin/python3.6-config -> python3.6m-config
-rwxr-xr-x 2 root root 10560 28. Jun 12:01 /usr/bin/python3.6m
-rwxr-xr-x 1 root root  3440 28. Jun 12:01 /usr/bin/python3.6m-config
lrwxrwxrwx 1 root root    16 28. Jun 12:01 /usr/bin/python3-config -> python3.6-config
lrwxrwxrwx 1 root root    45  9. Apr 11:22 /usr/bin/pythontex -> ../share/texmf/scripts/pythontex/pythontex.py

@howetuft
Copy link
Collaborator

howetuft commented Aug 4, 2024

Hello,
My understanding of the problem:
Your system Python version is 3.6, although there are alternatives installed (3.10, 3.11).
This is the Python version which Render finds when trying to fetch its dependencies.
However, Render requires 3.8 or higher, so it results in an exception.
Now I must think of a solution (maybe allow the user to set the python interpreter in the worbench settings)...
However, in the meantime, if you have a way to set 3.11 as the system version, that may also work.

@howetuft howetuft reopened this Aug 5, 2024
@howetuft
Copy link
Collaborator

howetuft commented Aug 5, 2024

@MakerFC I reopen. Have you been notified of my last posts, as the issue was closed?

@MakerFC
Copy link
Author

MakerFC commented Aug 5, 2024

Yes of course, I read all posts.

@howetuft
Copy link
Collaborator

Hello @MakerFC,

Sorry, I took a few days off - thought about your issue, however.

To me, what you need is a version manager for Python. I've found that openSUSE has pyenv (https://software.opensuse.org/package/pyenv?locale=en): could you please give it a try?

The way I would suggest to do:

  • Install pyenv
  • Open a terminal
  • List your Python versions: pyenv versions
  • Select your target version (>=3.8) and switch to it in the current shell: pyenv shell <version>
  • Run FreeCAD from this shell (freecad - you may have to adapt upper/lower cases)

Can you let me know?

@MakerFC
Copy link
Author

MakerFC commented Aug 19, 2024

Hello howetuft,
Thank you very much for your continued involvement.
Pyenv was already installed on my OS.
The result output of the command is not really enlightening:
`
$ pyenv versions

  • system (set by /home/user/.pyenv/version)
    `

@howetuft
Copy link
Collaborator

OK. In that case, I may suggest you install a suitable alternative version via pyenv, for instance:
$ pyenv 3.11
And then run the steps 2 to 5

@howetuft
Copy link
Collaborator

howetuft commented Sep 3, 2024

Hello @MakerFC,

Have you been able to try the above proposition? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants