Closed KikeM closed 4 years ago
The solution for the moment is not clean at all ... I haven't had the time to work on the installation.
When I began using this library I tried to install it and had trouble. I realised what was breaking my installation was the fact that the libxfoil.dylib
file was being created, but for some reason not in the folder the installation procedure expected. Therefore, the installation ended with an error.
Since the file was created, which means the Fortran code has been compiled, I did a dirty workaround.
setup.py
where I did not invoke the compilation step. Basically, I ran the installation to compile (to get the file) and then the installation without compilation (to be able to work with the library). That did the trick.
setup.py
file to something like no_compilation_setup.py
.old_setup.py
file to setup.py
. pip install --no-cache-dir --force-reinstall .
(this should generate the compiled Fortran library).setup.py
file to old_setup.py
. no_compilation_setup.py
file to setup.py
.pip install --no-cache-dir --force-reinstall .
(this should install the library in your site-packages
folder inside your environment). Tell me what happened from here onwards so that we continue debugging :)
Do you plan to extend the functionality of the library or do you want the simply use the current code.
Hi,
Thanks for the help. I am now blocked at step 3.
$ sudo pip3 install --no-cache-dir --force-reinstall .
Processing /home/john/Bureau/xfoil-python-master
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /home/john/.local/lib/python3.5/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-6cd9omhj/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- scikit-build cmake
cwd: None
Complete output (18 lines):
WARNING: The directory '/home/john/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting scikit-build
Downloading scikit_build-0.11.1-py2.py3-none-any.whl (72 kB)
Collecting cmake
Downloading cmake-3.18.0.tar.gz (28 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-7upyyj9e/cmake/setup.py'"'"'; __file__='"'"'/tmp/pip-install-7upyyj9e/cmake/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-7upyyj9e/cmake/pip-egg-info
cwd: /tmp/pip-install-7upyyj9e/cmake/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-7upyyj9e/cmake/setup.py", line 7, in <module>
from skbuild import setup
ImportError: No module named 'skbuild'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 /home/john/.local/lib/python3.5/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-6cd9omhj/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- scikit-build cmake Check the logs for full command output.
I don't really know what is going on. looks like problem with cmake or skbuild.
For now I just plan to use the current code.
looks like problem with cmake or skbuild.
https://github.com/scikit-build/cmake-python-distributions/issues/86
In this issue they seem to suggest the following solution:
pip install scikit-build
pip install cmake
Building bugs and problems are always painful ...
I use Ubuntu (32bits) not using conda.
I installed scikit-build correctly.
I had problem to install cmake. Update pip to 20.1 solved it.
Then I had problem on step 3 : pip install --no-cache-dir --force-reinstall .
Cmake was looking for /usr/local/bin/gfortran
but gfortran was installed here /usr/bin/gfortran
so I made a symlink to solve it
Step 4, 5, 6 went without issue.
I was able to import xfoil
correctly on python.
I hard-coded the variable:
lib_path = '/home/john/Bureau/xfoil-python-master/build/lib.linux-i686-3.5/xfoil/libxfoil.so'
lib_ext ='so'
I had to comment from deprecated import deprecated
and corresponding functions, because I don't have that module
Now everything works !! Thanks for your help.
So glad to read this!
Some takeaways for @KikeM:
requirements.txt
file. Let me know how things go using the library, if you have any doubts or problems do not hesitate and create issues.
Cheers
The user @parmonon reported a problem after installing the library and then running it.