jniltinho / go-samba4

A web interface to manage a remote samba4 server - Python, Flask Framework
https://www.linuxpro.com.br
MIT License
49 stars 13 forks source link

ImportError: No module named samba #2

Open nowrap opened 5 years ago

nowrap commented 5 years ago

Hello, i tried to start ./go_samba4 on an ubuntu 16 lts today, but it failed with the following messages:

Traceback (most recent call last):
  File "go_samba4.py", line 30, in <module>
  File "/tmp/pip-build-hPjfl7/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 396, in load_module
  File "app/__init__.py", line 31, in <module>
  File "/tmp/pip-build-hPjfl7/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 396, in load_module
  File "app/views/default.py", line 12, in <module>
  File "/tmp/pip-build-hPjfl7/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 396, in load_module
  File "app/model/auth/auth_base.py", line 7, in <module>
ImportError: No module named samba
[18739] Failed to execute script go_samba4

I installed python, pip and python packages from the requirements.txt

// edit One difference is the installed samba version: 4.3.11

christiantosta commented 5 years ago

Try to install a more recent samba version and python-samba:

sudo apt-get install python-samba

pseudo-r commented 4 years ago

Same problem here I tried to install the docker/new version but I get the same error message when I try to run ./go_samba4 --server-prod --ssl I already install the most recent version of samba and python-samba

burnbabyburn commented 4 years ago

Same here on arm64 Maybe it's because of this changelog entry? I'll try and rebuild tomorrow

Python2 support
---------------
Samba 4.11 will not have any runtime support for Python 2.

To build Samba with python2 you *must* set the 'PYTHON' environment
variable for both the 'configure' and 'make' steps, i.e.
   'PYTHON=python2 ./configure'
   'PYTHON=python2 make'
This will override the python3 default.

Except for this specific build-time use of python2, Samba now requires
Python 3.4 as a minimum.

Release Notes for Samba 4.12.0
This is the first stable release of the Samba 4.12 release series.
Please read the release notes carefully before upgrading.

NEW FEATURES/CHANGES
Python 3.5 Required
Samba's minimum runtime requirement for python was raised to Python 3.4 with samba 4.11. Samba 4.12 raises this minimum version to Python 3.5 both to access new features and because this is the oldest version we test with in our CI infrastructure.

(Build time support for the file server with Python 2.6 has not changed)

samba 4.9 which is the last version which supports python2 (ignore the statements from samba devs. configure breaks if you run it that way => requesting python 3.5) works fine and go_samba4 server comes up If you want a newer samba version than that, you have to compile samba and go_samba4 with python3.

burnbabyburn commented 4 years ago

bumped up to python3.8 on ubuntu 20.04 lts https://github.com/burnbabyburn/go-samba4/ works fine now keep in mind this is an arm64 tree so you need to compile ( via docker) yourself. script is arch independed now