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

@ninfinity : can you give me instructions on how to install your version. I am trying but I am getting error. #4

Open
emvalbuena opened this issue Sep 4, 2019 · 16 comments

Comments

@emvalbuena
Copy link

@ninfinity : can you give me instructions on how to install your version. I am trying but I am getting error.

home/chaitu1351/anaconda3/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'zip_save'
      warnings.warn(msg)
    error: can't copy 'build/lib.linux-x86_64-3.7/xfoil/xfoil.cpython-37m-x86_64-linux-gnu.so': doesn't exist or not a regular file
    ['-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=/home/chaitu1351/src/xfoil/build/lib.linux-x86_64-3.7/xfoil', '-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE=build/temp.linux-x86_64-3.7', '-DPYTHON_EXECUTABLE=/home/chaitu1351/anaconda3/bin/python']

Originally posted by @ckesanapalli in daniel-de-vries#2 (comment)

@emvalbuena
Copy link
Author

If you look in the compilation folders, you will see that the library has actually been compiled correctly.

Captura de pantalla 2019-09-04 a las 20 14 21

@felaube
Copy link

felaube commented Oct 16, 2019

I got the same error, but here the library hasn't been compiled.

@emvalbuena
Copy link
Author

emvalbuena commented Oct 17, 2019

@Fer123a Could you please copy-paste the error output?

@felaube
Copy link

felaube commented Oct 17, 2019

Running setup.py install for xfoil ... error
ERROR: Command errored out with exit status 1:
 command: 'c:\users\ferna\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ferna\\AppData\\Local\\Temp\\pip-install-zdrb36aa\\xfoil\\setup.py'"'"'; __file__='"'"'C:\\Users\\ferna\\AppData\\Local\\Temp\\pip-install-zdrb36aa\\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 'C:\Users\ferna\AppData\Local\Temp\pip-record-vicsta8t\install-record.txt' --single-version-externally-managed --compile
     cwd: C:\Users\ferna\AppData\Local\Temp\pip-install-zdrb36aa\xfoil\
Complete output (61 lines):
c:\users\ferna\appdata\local\programs\python\python37-32\lib\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.win32-3.7
creating build\lib.win32-3.7\xfoil
copying xfoil\model.py -> build\lib.win32-3.7\xfoil
copying xfoil\test.py -> build\lib.win32-3.7\xfoil
copying xfoil\xfoil.py -> build\lib.win32-3.7\xfoil
copying xfoil\__init__.py -> build\lib.win32-3.7\xfoil
running build_ext
Traceback (most recent call last):
  File "C:\Users\ferna\AppData\Local\Temp\pip-install-zdrb36aa\xfoil\setup.py", line 55, in build_extensions
    out = subprocess.check_output(['cmake', '--version'])
  File "c:\users\ferna\appdata\local\programs\python\python37-32\lib\subprocess.py", line 395, in check_output
    **kwargs).stdout
  File "c:\users\ferna\appdata\local\programs\python\python37-32\lib\subprocess.py", line 472, in run
    with Popen(*popenargs, **kwargs) as process:
  File "c:\users\ferna\appdata\local\programs\python\python37-32\lib\subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "c:\users\ferna\appdata\local\programs\python\python37-32\lib\subprocess.py", line 1178, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] O sistema não pode encontrar o arquivo especificado

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\ferna\AppData\Local\Temp\pip-install-zdrb36aa\xfoil\setup.py", line 145, in <module>
    zip_save=False
  File "c:\users\ferna\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "c:\users\ferna\appdata\local\programs\python\python37-32\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "c:\users\ferna\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "c:\users\ferna\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "c:\users\ferna\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\command\install.py", line 61, in run
    return orig.install.run(self)
  File "c:\users\ferna\appdata\local\programs\python\python37-32\lib\distutils\command\install.py", line 545, in run
    self.run_command('build')
  File "c:\users\ferna\appdata\local\programs\python\python37-32\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "c:\users\ferna\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "c:\users\ferna\appdata\local\programs\python\python37-32\lib\distutils\command\build.py", line 135, in run
    self.run_command(cmd_name)
  File "c:\users\ferna\appdata\local\programs\python\python37-32\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "c:\users\ferna\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "c:\users\ferna\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\command\build_ext.py", line 78, in run        
    _build_ext.run(self)
  File "c:\users\ferna\appdata\local\programs\python\python37-32\lib\distutils\command\build_ext.py", line 340, in run
    self.build_extensions()
  File "C:\Users\ferna\AppData\Local\Temp\pip-install-zdrb36aa\xfoil\setup.py", line 57, in build_extensions
    raise RuntimeError('Cannot find CMake executable')
RuntimeError: Cannot find CMake executable
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\ferna\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ferna\\AppData\\Local\\Temp\\pip-install-zdrb36aa\\xfoil\\setup.py'"'"'; __file__='"'"'C:\\Users\\ferna\\AppData\\Local\\Temp\\pip-install-zdrb36aa\\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 'C:\Users\ferna\AppData\Local\Temp\pip-record-vicsta8t\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.

@emvalbuena
Copy link
Author

emvalbuena commented Oct 17, 2019

Have you checked if you have CMake installed?

If you have a closer look, it is not the same error as the one reported above.

@felaube
Copy link

felaube commented Oct 17, 2019

Yeah, you're right, it's a different error. I have cmake installed, and I also have MinGW C and FORTRAN compilers installed and MinGW\bin directory added to the Path environment variable.

@felaube
Copy link

felaube commented Oct 17, 2019

I found out what was wrong, I was just using a 32 bits Python Interpreter instead of a 64 bits one.
Now, I was able to install the package, but I came across another error:

>>> from xfoil import XFoil
>>> xf = XFoil()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\ferna\AppData\Local\Programs\Python\Python37\lib\site-packages\xfoil\xfoil.py", line 56, in __init__
    self._lib = cdll.LoadLibrary(self._lib_path)
File "C:\Users\ferna\AppData\Local\Programs\Python\Python37\lib\ctypes\__init__.py", line 442, in LoadLibrary
    return self._dlltype(name)
File "C:\Users\ferna\AppData\Local\Programs\Python\Python37\lib\ctypes\__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 não é um aplicativo Win32 válido
>>> quit()
Exception ignored in: <function XFoil.__del__ at 0x0000021FF7D79AF8>
Traceback (most recent call last):
File "C:\Users\ferna\AppData\Local\Programs\Python\Python37\lib\site-packages\xfoil\xfoil.py", line 66, in __del__
    handle = self._lib._handle
AttributeError: 'XFoil' object has no attribute '_lib'

The line "OSError: [WinError 193] %1 não é um aplicativo Win32 válido" says [WinError 193] %1 is not a valid Win32 application

@emvalbuena
Copy link
Author

Mmm, the truth is that since I am running on a MacOs system it is more difficult to test your problem.

Could you send snapshot of the folders and the builds created by the installation process?

@felaube
Copy link

felaube commented Oct 18, 2019

image

image

image

image

@gmonechi
Copy link

gmonechi commented Jun 3, 2020

I found out what was wrong, I was just using a 32 bits Python Interpreter instead of a 64 bits one.
Now, I was able to install the package, but I came across another error:

>>> from xfoil import XFoil
>>> xf = XFoil()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\ferna\AppData\Local\Programs\Python\Python37\lib\site-packages\xfoil\xfoil.py", line 56, in __init__
    self._lib = cdll.LoadLibrary(self._lib_path)
File "C:\Users\ferna\AppData\Local\Programs\Python\Python37\lib\ctypes\__init__.py", line 442, in LoadLibrary
    return self._dlltype(name)
File "C:\Users\ferna\AppData\Local\Programs\Python\Python37\lib\ctypes\__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 não é um aplicativo Win32 válido
>>> quit()
Exception ignored in: <function XFoil.__del__ at 0x0000021FF7D79AF8>
Traceback (most recent call last):
File "C:\Users\ferna\AppData\Local\Programs\Python\Python37\lib\site-packages\xfoil\xfoil.py", line 66, in __del__
    handle = self._lib._handle
AttributeError: 'XFoil' object has no attribute '_lib'

The line "OSError: [WinError 193] %1 não é um aplicativo Win32 válido" says [WinError 193] %1 is not a valid Win32 application

I am currently having the same issue as this, is there any solution? The installation was successful and the folder structure is the same to what @Fer123a has.

@felaube
Copy link

felaube commented Jun 3, 2020

I found out what was wrong, I was just using a 32 bits Python Interpreter instead of a 64 bits one.
Now, I was able to install the package, but I came across another error:

>>> from xfoil import XFoil
>>> xf = XFoil()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\ferna\AppData\Local\Programs\Python\Python37\lib\site-packages\xfoil\xfoil.py", line 56, in __init__
    self._lib = cdll.LoadLibrary(self._lib_path)
File "C:\Users\ferna\AppData\Local\Programs\Python\Python37\lib\ctypes\__init__.py", line 442, in LoadLibrary
    return self._dlltype(name)
File "C:\Users\ferna\AppData\Local\Programs\Python\Python37\lib\ctypes\__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 não é um aplicativo Win32 válido
>>> quit()
Exception ignored in: <function XFoil.__del__ at 0x0000021FF7D79AF8>
Traceback (most recent call last):
File "C:\Users\ferna\AppData\Local\Programs\Python\Python37\lib\site-packages\xfoil\xfoil.py", line 66, in __del__
    handle = self._lib._handle
AttributeError: 'XFoil' object has no attribute '_lib'

The line "OSError: [WinError 193] %1 não é um aplicativo Win32 válido" says [WinError 193] %1 is not a valid Win32 application

I am currently having the same issue as this, is there any solution? The installation was successful and the folder structure is the same to what @Fer123a has.

Ultimately I was not able to use this package. I ended up using the method described in the first videos of the following YouTube playlist https://www.youtube.com/playlist?list=PLxT-itJ3HGuUDVMuWKBxyoY8Dm9O9qstP. In the videos, the guy uses MATLAB, but in the descriptions you can find links to the python scripts that does the same as the MATLAB ones. I don't know what you're trying to do, but maybe that works for you too.

@gmonechi
Copy link

gmonechi commented Jun 4, 2020

Thank you, I will look into it

@joshuaxdmb
Copy link

I am getting the same issue:

AttributeError: 'XFoil' object has no attribute '_lib'

Although, I did make it work a long time ago on my old computer. I don't remember doing anything in particular. It just started to work after I was using Aerosandbox for a long time.

Does anyone have a solution? I already tried reinstalling OpenSSL in all ways possible as suggested in other threads.

Many thanks!

@hntter
Copy link

hntter commented Oct 9, 2020

I have the same issues with @Fer123a @joshuaxdmb @gmonechi

Traceback (most recent call last):
File "E:/Projects/Propeller_design/ceshi.py", line 6, in
xf = XFoil()
File "D:\Engineering Software\Python3.8\lib\site-packages\xfoil\xfoil.py", line 57, in init
self._lib = cdll.LoadLibrary(self.lib_path)
File "D:\Engineering Software\Python3.8\lib\ctypes_init
.py", line 451, in LoadLibrary
return self.dlltype(name)
File "D:\Engineering Software\Python3.8\lib\ctypes_init
.py", line 373, in init
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'C:\Users\ZQu\AppData\Local\Temp\tmpmqwr1zy7.dll' (or one of its dependencies). Try using the full path with constructor syntax.
Exception ignored in: <function XFoil.del at 0x03DFEB20>
Traceback (most recent call last):
File "D:\Engineering Software\Python3.8\lib\site-packages\xfoil\xfoil.py", line 67, in del
handle = self._lib._handle
AttributeError: 'XFoil' object has no attribute '_lib'

Has anybody fixed this issues? It really bother me for 2 weeks

@joshuaxdmb
Copy link

@hntter Try using python 3.7 instead of 3.8.

@matthiasmfr
Copy link

@hntter Try using python 3.7 instead of 3.8.

This did not make a difference for me. Neither on windows nor Mac

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

7 participants
@emvalbuena @hntter @gmonechi @felaube @joshuaxdmb @matthiasmfr and others