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

Installing on Linux #14

Open
tomaso909 opened this issue Jun 5, 2020 · 3 comments
Open

Installing on Linux #14

tomaso909 opened this issue Jun 5, 2020 · 3 comments

Comments

@tomaso909
Copy link

I'm trying to install on Linux but I get the following error:

(full3) truiz@d3ws1 /mnt/DATA/home/truiz$ pip install xfoil
Collecting xfoil
  Using cached xfoil-1.1.1.tar.gz (12 kB)
Requirement already satisfied: numpy in /mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/site-packages (from xfoil) (1.18.5)
Building wheels for collected packages: xfoil
  Building wheel for xfoil (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-b4dc997p/xfoil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-b4dc997p/xfoil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-5gvntgln
       cwd: /tmp/pip-install-b4dc997p/xfoil/
  Complete output (46 lines):
  /mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/distutils/dist.py:274: UserWarning: Unknown distribution option: 'zip_save'
    warnings.warn(msg)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.8
  creating build/lib.linux-x86_64-3.8/xfoil
  copying xfoil/model.py -> build/lib.linux-x86_64-3.8/xfoil
  copying xfoil/__init__.py -> build/lib.linux-x86_64-3.8/xfoil
  copying xfoil/test.py -> build/lib.linux-x86_64-3.8/xfoil
  copying xfoil/xfoil.py -> build/lib.linux-x86_64-3.8/xfoil
  running build_ext
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-b4dc997p/xfoil/setup.py", line 120, in <module>
      setup(
    File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/site-packages/setuptools/__init__.py", line 161, in setup
      return distutils.core.setup(**attrs)
    File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 223, in run
      self.run_command('build')
    File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 87, in run
      _build_ext.run(self)
    File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/distutils/command/build_ext.py", line 306, in run
      self.compiler = new_compiler(compiler=self.compiler,
    File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/distutils/ccompiler.py", line 1032, in new_compiler
      return klass(None, dry_run, force)
    File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/distutils/cygwinccompiler.py", line 296, in __init__
      if self.gcc_version <= "2.91.57":
  TypeError: '<=' not supported between instances of 'NoneType' and 'str'
  ----------------------------------------
  ERROR: Failed building wheel for xfoil
  Running setup.py clean for xfoil
Failed to build xfoil
Installing collected packages: xfoil
    Running setup.py install for xfoil ... error
    ERROR: Command errored out with exit status 1:
     command: /mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-b4dc997p/xfoil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-b4dc997p/xfoil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-qunqtpq5/install-record.txt --single-version-externally-managed --compile --install-headers /mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/include/python3.8/xfoil
         cwd: /tmp/pip-install-b4dc997p/xfoil/
    Complete output (48 lines):
    /mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/distutils/dist.py:274: UserWarning: Unknown distribution option: 'zip_save'
      warnings.warn(msg)
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.8
    creating build/lib.linux-x86_64-3.8/xfoil
    copying xfoil/model.py -> build/lib.linux-x86_64-3.8/xfoil
    copying xfoil/__init__.py -> build/lib.linux-x86_64-3.8/xfoil
    copying xfoil/test.py -> build/lib.linux-x86_64-3.8/xfoil
    copying xfoil/xfoil.py -> build/lib.linux-x86_64-3.8/xfoil
    running build_ext
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-b4dc997p/xfoil/setup.py", line 120, in <module>
        setup(
      File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/site-packages/setuptools/__init__.py", line 161, in setup
        return distutils.core.setup(**attrs)
      File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/distutils/command/install.py", line 545, in run
        self.run_command('build')
      File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 87, in run
        _build_ext.run(self)
      File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/distutils/command/build_ext.py", line 306, in run
        self.compiler = new_compiler(compiler=self.compiler,
      File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/distutils/ccompiler.py", line 1032, in new_compiler
        return klass(None, dry_run, force)
      File "/mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/lib/python3.8/distutils/cygwinccompiler.py", line 296, in __init__
        if self.gcc_version <= "2.91.57":
    TypeError: '<=' not supported between instances of 'NoneType' and 'str'
    ----------------------------------------
ERROR: Command errored out with exit status 1: /mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-b4dc997p/xfoil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-b4dc997p/xfoil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-qunqtpq5/install-record.txt --single-version-externally-managed --compile --install-headers /mnt/DATA/work/General-Development/Global-Utils/miniconda2/envs/full3/include/python3.8/xfoil Check the logs for full command output.

I have gfortran and gcc available on the PATH.
I'm using Python 3.8.3:

(full3) truiz@d3ws1 /mnt/DATA/home/truiz$ python
Python 3.8.3 (default, May 19 2020, 18:47:26) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
@matteobarbera
Copy link

I had the same error occur in python's distutils/cygwinccompiler.py. The function get_version() tries to get the gcc version number by using the flag -dumpversion, but gcc-7 changed the behavior of this flag to only output the major version number. I added the flag -dumpfullversion on line 399 in cygwincompiler.py and it fixed the error.

commands = ['gcc -dumpfullversion -dumpversion', 'ld -v', 'dllwrap --version']

Unfortunately I get another error, which I haven't managed to get around yet

python -m pip install xfoil
Defaulting to user installation because normal site-packages is not writeable
Collecting xfoil
  Using cached xfoil-1.1.1.tar.gz (12 kB)
Requirement already satisfied: numpy in ./.local/lib/python3.6/site-packages (from xfoil) (1.18.1)
Building wheels for collected packages: xfoil
  Building wheel for xfoil (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-nceell5q/xfoil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-nceell5q/xfoil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-885y_noq
       cwd: /tmp/pip-install-nceell5q/xfoil/
  Complete output (49 lines):
  /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'zip_save'
    warnings.warn(msg)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.6
  creating build/lib.linux-x86_64-3.6/xfoil
  copying xfoil/xfoil.py -> build/lib.linux-x86_64-3.6/xfoil
  copying xfoil/__init__.py -> build/lib.linux-x86_64-3.6/xfoil
  copying xfoil/model.py -> build/lib.linux-x86_64-3.6/xfoil
  copying xfoil/test.py -> build/lib.linux-x86_64-3.6/xfoil
  running build_ext
  ['-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=/tmp/pip-install-nceell5q/xfoil/build/lib.linux-x86_64-3.6/xfoil', '-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE=build/temp.linux-x86_64-3.6', '-DPYTHON_EXECUTABLE=/usr/bin/python3']
  CMake Error: The source directory "/tmp/pip-install-nceell5q/xfoil" does not appear to contain CMakeLists.txt.
  Specify --help for usage, or press the help button on the CMake GUI.
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-nceell5q/xfoil/setup.py", line 149, in <module>
      zip_save=False
    File "/usr/local/lib/python3.6/dist-packages/setuptools/__init__.py", line 144, in setup
      return distutils.core.setup(**attrs)
    File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 204, in run
      self.run_command('build')
    File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/usr/local/lib/python3.6/dist-packages/setuptools/command/build_ext.py", line 87, in run
      _build_ext.run(self)
    File "/usr/lib/python3.6/distutils/command/build_ext.py", line 339, in run
      self.build_extensions()
    File "/tmp/pip-install-nceell5q/xfoil/setup.py", line 110, in build_extensions
      cwd=self.build_temp)
    File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-install-nceell5q/xfoil', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=/tmp/pip-install-nceell5q/xfoil/build/lib.linux-x86_64-3.6/xfoil', '-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE=build/temp.linux-x86_64-3.6', '-DPYTHON_EXECUTABLE=/usr/bin/python3']' returned non-zero exit status 1.
  ----------------------------------------
  ERROR: Failed building wheel for xfoil
  Running setup.py clean for xfoil
Failed to build xfoil
Installing collected packages: xfoil
    Running setup.py install for xfoil ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-nceell5q/xfoil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-nceell5q/xfoil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-hn1518io/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/matteo/.local/include/python3.6m/xfoil
         cwd: /tmp/pip-install-nceell5q/xfoil/
    Complete output (51 lines):
    /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'zip_save'
      warnings.warn(msg)
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/xfoil
    copying xfoil/xfoil.py -> build/lib.linux-x86_64-3.6/xfoil
    copying xfoil/__init__.py -> build/lib.linux-x86_64-3.6/xfoil
    copying xfoil/model.py -> build/lib.linux-x86_64-3.6/xfoil
    copying xfoil/test.py -> build/lib.linux-x86_64-3.6/xfoil
    running build_ext
    ['-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=/tmp/pip-install-nceell5q/xfoil/build/lib.linux-x86_64-3.6/xfoil', '-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE=build/temp.linux-x86_64-3.6', '-DPYTHON_EXECUTABLE=/usr/bin/python3']
    CMake Error: The source directory "/tmp/pip-install-nceell5q/xfoil" does not appear to contain CMakeLists.txt.
    Specify --help for usage, or press the help button on the CMake GUI.
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-nceell5q/xfoil/setup.py", line 149, in <module>
        zip_save=False
      File "/usr/local/lib/python3.6/dist-packages/setuptools/__init__.py", line 144, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/local/lib/python3.6/dist-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/lib/python3.6/distutils/command/install.py", line 589, in run
        self.run_command('build')
      File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/local/lib/python3.6/dist-packages/setuptools/command/build_ext.py", line 87, in run
        _build_ext.run(self)
      File "/usr/lib/python3.6/distutils/command/build_ext.py", line 339, in run
        self.build_extensions()
      File "/tmp/pip-install-nceell5q/xfoil/setup.py", line 110, in build_extensions
        cwd=self.build_temp)
      File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-install-nceell5q/xfoil', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=/tmp/pip-install-nceell5q/xfoil/build/lib.linux-x86_64-3.6/xfoil', '-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE=build/temp.linux-x86_64-3.6', '-DPYTHON_EXECUTABLE=/usr/bin/python3']' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-nceell5q/xfoil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-nceell5q/xfoil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-hn1518io/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/matteo/.local/include/python3.6m/xfoil Check the logs for full command output.

@danieljuschus
Copy link

Using pip 20.1 instead of 20.1.1 solved this for me (I did pip install pip==20.1 within my venv). Not sure why though.

@sphh
Copy link

sphh commented Jun 18, 2021

The development has now moved to https://codeberg.org/xfoil-python/xfoil-python/ (see #21).

There is a pull request, which solves this problem: https://codeberg.org/xfoil-python/xfoil-python/pulls/27 adds MANIFEST.in with this contents:

include CMakeLists.txt
include src/*

Now python3 setup.py sdist includes this missing files in the archive used to install it.

Note, that this is not (yet) available on PyPi.

ngoiz pushed a commit to ngoiz/xfoil-python that referenced this issue Nov 30, 2021
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

4 participants