Installation von Pandas auf OpenSuse 42.3 klemmt...

Probleme bei der Installation?
Antworten
say_hello
User
Beiträge: 14
Registriert: Sonntag 14. Oktober 2012, 12:33

Sonntag 25. Februar 2018, 22:56

Hallo und guten Abend

heute habe ich eine Frage zur Intallation:
zur Installation von Pandas auf OpenSuse 42.3 klemmt; ich habe ziemliche Probleme beim Installieren auf der Linux-Maschine.

Code: Alles auswählen

  Downloading pandas-0.22.0.tar.gz (11.3MB)
    100% |████████████████████████████████| 11.3MB 62kB/s 
    Complete output from command python setup.py egg_info:
    non-existing path in 'numpy/distutils': 'site.cfg'
    Could not locate executable gfortran
    Could not locate executable f95
    Could not locate executable ifort
    Could not locate executable ifc
    Could not locate executable lf95
    Could not locate executable pgfortran
    Could not locate executable f90
    Could not locate executable f77
    Could not locate executable fort
    Could not locate executable efort
    Could not locate executable efc
    Could not locate executable g77
    Could not locate executable g95
    Could not locate executable pathf95
    Could not locate executable nagfor
    don't know how to compile Fortran code on platform 'posix'
    Running from numpy source directory.                                                                                                                                                        
    /tmp/easy_install-j3aosykh/numpy-1.14.1/setup.py:369: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates                       
      run_build = parse_setuppy_commands()                                                                                                                                                      
    /usr/lib64/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'python_requires'                                                                                     
      warnings.warn(msg)                                                                                                                                                                        
    /tmp/easy_install-j3aosykh/numpy-1.14.1/numpy/distutils/system_info.py:624: UserWarning:
        Atlas (http://math-atlas.sourceforge.net/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [atlas]) or by setting
        the ATLAS environment variable.
      self.calc_info()
    /tmp/easy_install-j3aosykh/numpy-1.14.1/numpy/distutils/system_info.py:624: UserWarning:
        Blas (http://www.netlib.org/blas/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [blas]) or by setting
        the BLAS environment variable.
      self.calc_info()
    /tmp/easy_install-j3aosykh/numpy-1.14.1/numpy/distutils/system_info.py:624: UserWarning:
        Blas (http://www.netlib.org/blas/) sources not found.
        Directories to search for the sources can be specified in the
        numpy/distutils/site.cfg file (section [blas_src]) or by setting
        the BLAS_SRC environment variable.
      self.calc_info()
    /tmp/easy_install-j3aosykh/numpy-1.14.1/numpy/distutils/system_info.py:624: UserWarning:
        Lapack (http://www.netlib.org/lapack/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [lapack]) or by setting
        the LAPACK environment variable.
      self.calc_info()
    /tmp/easy_install-j3aosykh/numpy-1.14.1/numpy/distutils/system_info.py:624: UserWarning:
        Lapack (http://www.netlib.org/lapack/) sources not found.
        Directories to search for the sources can be specified in the
        numpy/distutils/site.cfg file (section [lapack_src]) or by setting
        the LAPACK_SRC environment variable.
      self.calc_info()
    /usr/lib64/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'define_macros'
      warnings.warn(msg)
    /usr/lib64/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'python_requires'
      warnings.warn(msg)
    Traceback (most recent call last):
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 152, in save_modules
        yield saved
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 193, in setup_context
        yield
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 237, in run_setup
        DirectorySandbox(setup_dir).run(runner)
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 267, in run
        return func()
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 236, in runner
        _execfile(setup_script, ns)
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 46, in _execfile
        exec(code, globals, locals)
      File "/tmp/easy_install-j3aosykh/numpy-1.14.1/setup.py", line 394, in <module>
    
      File "/tmp/easy_install-j3aosykh/numpy-1.14.1/setup.py", line 386, in setup_package
    
      File "/tmp/easy_install-j3aosykh/numpy-1.14.1/numpy/distutils/core.py", line 169, in setup
      File "/usr/lib64/python3.4/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib64/python3.4/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/lib64/python3.4/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.4/site-packages/setuptools/command/bdist_egg.py", line 151, in run
        self.run_command("egg_info")
      File "/usr/lib64/python3.4/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib64/python3.4/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/tmp/easy_install-j3aosykh/numpy-1.14.1/numpy/distutils/command/egg_info.py", line 26, in run
      File "/usr/lib64/python3.4/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib64/python3.4/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/tmp/easy_install-j3aosykh/numpy-1.14.1/numpy/distutils/command/build_src.py", line 148, in run
      File "/tmp/easy_install-j3aosykh/numpy-1.14.1/numpy/distutils/command/build_src.py", line 159, in build_sources
      File "/tmp/easy_install-j3aosykh/numpy-1.14.1/numpy/distutils/command/build_src.py", line 294, in build_library_sources
      File "/tmp/easy_install-j3aosykh/numpy-1.14.1/numpy/distutils/command/build_src.py", line 377, in generate_sources
      File "numpy/core/setup.py", line 675, in get_mathlib_info
        'pandas.tests.computation',
    RuntimeError: Broken toolchain: cannot link a simple C program
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-9jb46c5p/pandas/setup.py", line 743, in <module>
        **setuptools_kwargs)
      File "/usr/lib64/python3.4/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/lib/python3.4/site-packages/setuptools/dist.py", line 268, in __init__
        self.fetch_build_eggs(attrs['setup_requires'])
      File "/usr/lib/python3.4/site-packages/setuptools/dist.py", line 313, in fetch_build_eggs
        replace_conflicting=True,
      File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 836, in resolve
        dist = best[req.key] = env.best_match(req, ws, installer)
      File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 1081, in best_match
        return self.obtain(req, installer)
      File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 1093, in obtain
        return installer(requirement)
      File "/usr/lib/python3.4/site-packages/setuptools/dist.py", line 380, in fetch_build_egg
        return cmd.easy_install(req)
      File "/usr/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 645, in easy_install
        return self.install_item(spec, dist.location, tmpdir, deps)
      File "/usr/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 675, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "/usr/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 858, in install_eggs
        return self.build_and_install(setup_script, setup_base)
      File "/usr/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 1086, in build_and_install
        self.run_setup(setup_script, setup_base, args)
      File "/usr/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 1072, in run_setup
        run_setup(setup_script, args)
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 240, in run_setup
        raise
      File "/usr/lib64/python3.4/contextlib.py", line 77, in __exit__
        self.gen.throw(type, value, traceback)
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 193, in setup_context
        yield
      File "/usr/lib64/python3.4/contextlib.py", line 77, in __exit__
        self.gen.throw(type, value, traceback)
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 164, in save_modules
        saved_exc.resume()
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 139, in resume
        compat.reraise(type, exc, self._tb)
      File "/usr/lib/python3.4/site-packages/setuptools/compat.py", line 65, in reraise
        raise value.with_traceback(tb)
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 152, in save_modules
        yield saved
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 193, in setup_context
        yield
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 237, in run_setup
        DirectorySandbox(setup_dir).run(runner)
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 267, in run
        return func()
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 236, in runner
        _execfile(setup_script, ns)
      File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 46, in _execfile
        exec(code, globals, locals)
      File "/tmp/easy_install-j3aosykh/numpy-1.14.1/setup.py", line 394, in <module>
    
      File "/tmp/easy_install-j3aosykh/numpy-1.14.1/setup.py", line 386, in setup_package
    
      File "/tmp/easy_install-j3aosykh/numpy-1.14.1/numpy/distutils/core.py", line 169, in setup
      File "/usr/lib64/python3.4/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib64/python3.4/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/lib64/python3.4/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.4/site-packages/setuptools/command/bdist_egg.py", line 151, in run
        self.run_command("egg_info")
      File "/usr/lib64/python3.4/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib64/python3.4/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/tmp/easy_install-j3aosykh/numpy-1.14.1/numpy/distutils/command/egg_info.py", line 26, in run
      File "/usr/lib64/python3.4/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib64/python3.4/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/tmp/easy_install-j3aosykh/numpy-1.14.1/numpy/distutils/command/build_src.py", line 148, in run
      File "/tmp/easy_install-j3aosykh/numpy-1.14.1/numpy/distutils/command/build_src.py", line 159, in build_sources
      File "/tmp/easy_install-j3aosykh/numpy-1.14.1/numpy/distutils/command/build_src.py", line 294, in build_library_sources
      File "/tmp/easy_install-j3aosykh/numpy-1.14.1/numpy/distutils/command/build_src.py", line 377, in generate_sources
      File "numpy/core/setup.py", line 675, in get_mathlib_info
        'pandas.tests.computation',
    RuntimeError: Broken toolchain: cannot link a simple C program
    /bin/bash: gcc: Kommando nicht gefunden.
    /bin/bash: gcc: Kommando nicht gefunden.
    
. also - ich glaube dass ich da grundsätzlich mit der OpenSuse-Basis Probleme habe.

Ich werde die grundlegenden Daten nochmals ansehen müssen..

Code: Alles auswählen

 RuntimeError: Broken toolchain: cannot link a simple C program
__deets__
User
Beiträge: 2858
Registriert: Mittwoch 14. Oktober 2015, 14:29

Sonntag 25. Februar 2018, 23:19

Du hast augenscheinlich keine C/Fortran Compiler und Tools installiert. Das musst du vorher erledigen.
say_hello
User
Beiträge: 14
Registriert: Sonntag 14. Oktober 2012, 12:33

Dienstag 27. Februar 2018, 08:45

moin _deets_


vielen Dank für die Antwort. Das hilft weiter.

Code: Alles auswählen

zypper se -is gcc
hier die Ausgabe:

Code: Alles auswählen

Repository 'Packman Repository' ist veraltet. Sie können 'zypper refresh' als root ausführen, um es zu aktualisieren.
Repository 'packman' ist veraltet. Sie können 'zypper refresh' als root ausführ
en, um es zu aktualisieren.
Repository 'openSUSE-Leap-42.3-Update' ist veraltet. Sie können 'zypper refresh' als root ausführen, um es zu aktualisieren.
Repository-Daten werden geladen...
Installierte Pakete werden gelesen...

S  | Name            | Typ   | Version           | Arch   | Repository               
---+-----------------+-------+-------------------+--------+--------------------------
i+ | libgcc_s1       | Paket | 7.2.1+r253435-3.2 | x86_64 | openSUSE-Leap-42.3-Update
i+ | libgcc_s1-32bit | Paket | 7.2.1+r253435-3.2 | x86_64 | openSUSE-Leap-42.3-Update
martin@linux-3645:~/dev/python>

werd hier also nochmals gucken müssen....
say_hello
User
Beiträge: 14
Registriert: Sonntag 14. Oktober 2012, 12:33

Sonntag 4. März 2018, 18:19

hallo und guten Abend,

Code: Alles auswählen

zypper in gcc
zypper in -t pattern devel_basis

dann hab ich noch das folgende hier berücksichtigt:


https://stackoverflow.com/questions/223 ... 2#37145552

Code: Alles auswählen

zypper install python3-devel
zypper install subversion
zypper install pandas 
dann kam ich zu folgenden Rückmeldungen...

Code: Alles auswählen


Paket python3-devel-3.4.6-11.1.x86_64 abrufen                                                                                                              (1/1), 135,7 KiB (495,8 KiB entpackt)
Abrufen: python3-devel-3.4.6-11.1.x86_64.rpm .............................................................................................................................[fertig (424,7 KiB/s)]
Überprüfung auf Dateikonflikte läuft: ..................................................................................................................................................[fertig]
(1/1) Installieren: python3-devel-3.4.6-11.1.x86_64 ....................................................................................................................................[fertig]
linux-3645:/home/martin # zypper install subversion
Repository-Daten werden geladen...
Installierte Pakete werden gelesen...
'subversion' ist bereits installiert.
Kein Aktualisierungskandidat für 'subversion-1.9.7-8.1.x86_64'. Die neueste Version ist bereits installiert.
Paketabhängigkeiten werden aufgelöst...

Keine auszuführenden Aktionen.
linux-3645:/home/martin # zypper install numpy
Repository-Daten werden geladen...
Installierte Pakete werden gelesen...
'numpy' wurde in den Paketnamen nicht gefunden. Fähigkeiten werden durchsucht.
'python-numpy', welches 'numpy' bietet, ist bereits installiert.
Paketabhängigkeiten werden aufgelöst...

Keine auszuführenden Aktionen.
linux-3645:/home/martin # zypper install numpy
Repository-Daten werden geladen...
Installierte Pakete werden gelesen...
'numpy' wurde in den Paketnamen nicht gefunden. Fähigkeiten werden durchsucht.
'python-numpy', welches 'numpy' bietet, ist bereits installiert.
Paketabhängigkeiten werden aufgelöst...

Keine auszuführenden Aktionen.
linux-3645:/home/martin # zypper install pandas 
Repository-Daten werden geladen...
Installierte Pakete werden gelesen...
'pandas' wurde in den Paketnamen nicht gefunden. Fähigkeiten werden durchsucht.
Keine Anbieter von 'pandas' gefunden.
Paketabhängigkeiten werden aufgelöst...

Keine auszuführenden Aktionen.
linux-3645:/home/martin # 



conclusio; panda ist leider immer __ noch nicht__ installiert;

Code: Alles auswählen


import lxml.html as LH
import requests
import pandas as pd
def text(elt):
    return elt.text_content().replace(u'\xa0', u' ')

url = 'http://www.fdmbenzinpriser.dk/searchprices/5/'
r = requests.get(url)
root = LH.fromstring(r.content)

for table in root.xpath('//table[@id="sortabletable"]'):
    header = [text(th) for th in table.xpath('//th')]        # 1
    data = [[text(td) for td in tr.xpath('td')]  
            for tr in table.xpath('//tr')]                   # 2
    data = [row for row in data if len(row)==len(header)]    # 3
    data = pd.DataFrame(data, columns=header)                # 4
    print(data)

´wie man am folgenden sieht #

Code: Alles auswählen

martin@linux-3645:~/dev/python> python3 pan1.py
Traceback (most recent call last):
File "pan1.py", line 4, in <module>
import pandas as pd
ImportError: No module named 'pandas'
martin@linux-3645:~/dev/python>
__deets__
User
Beiträge: 2858
Registriert: Mittwoch 14. Oktober 2015, 14:29

Sonntag 4. März 2018, 18:50

Keine Ahnung was zypper ist, aber es gibt wohl kein Pandas darin. Wenn die Abhängigkeiten erfüllt sind, sollte pip install pandas funktionieren.
say_hello
User
Beiträge: 14
Registriert: Sonntag 14. Oktober 2012, 12:33

Sonntag 4. März 2018, 21:47

guten Abend,

mit diesem Code hab ich dann weitergemacht:

Code: Alles auswählen

pip3 install pandas
und diesen

Code: Alles auswählen

pip3 install --user pandas
herausgekommen ist das Folgende:

Code: Alles auswählen

linux-3645:/home/martin # pip3 install pandas
Collecting pandas
  Downloading pandas-0.22.0.tar.gz (11.3MB)
    100% |████████████████████████████████| 11.3MB 47kB/s 
Collecting python-dateutil>=2 (from pandas)
  Downloading python_dateutil-2.6.1-py2.py3-none-any.whl (194kB)
    100% |████████████████████████████████| 194kB 128kB/s 
Requirement already satisfied: pytz>=2011k in /usr/lib/python3.4/site-packages (from pandas)
Collecting numpy>=1.9.0 (from pandas)
  Downloading numpy-1.14.1-cp34-cp34m-manylinux1_x86_64.whl (12.1MB)
    100% |████████████████████████████████| 12.1MB 36kB/s 
Requirement already satisfied: six>=1.5 in /usr/lib/python3.4/site-packages (from python-dateutil>=2->pandas)
Installing collected packages: python-dateutil, numpy, pandas
  Running setup.py install for pandas ... done
Successfully installed numpy-1.14.1 pandas-0.22.0 python-dateutil-2.6.1
linux-3645:/home/martin # pip3 install --user pandas
Requirement already satisfied: pandas in /usr/lib64/python3.4/site-packages
Requirement already satisfied: python-dateutil>=2 in /usr/lib/python3.4/site-packages (from pandas)
Requirement already satisfied: pytz>=2011k in /usr/lib/python3.4/site-packages (from pandas)
Requirement already satisfied: numpy>=1.9.0 in /usr/lib64/python3.4/site-packages (from pandas)
Requirement already satisfied: six>=1.5 in /usr/lib/python3.4/site-packages (from python-dateutil>=2->pandas)
linux-3645:/home/martin # 
:)
Antworten