I'm trying to install python with asdf, so I've tried everything and it's not working
[lucaslinux#lucasPC ~]$ asdf install python latest
python-build 3.11.2 /home/lucaslinux/.asdf/installs/python/3.11.2
Downloading Python-3.11.2.tar.xz...
-> https://www.python.org/ftp/python/3.11.2/Python-3.11.2.tar.xz
Installing Python-3.11.2...
BUILD FAILED (Arch Linux using python-build 2.3.13-1-g86a4423b)
Inspect or clean up the working tree at /tmp/python-build.20230215220228.5116
Results logged to /tmp/python-build.20230215220228.5116.log
Last 10 log lines:
checking for pkg-config... no
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... "linux"
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/tmp/python-build.20230215220228.5116/Python-3.11.2':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
I tried to install python through asdf, I searched about it and found nothing
install these packages in your arch, I don't know the specific names in the arch but a little google search gives it.
Related
I'm generating wheel files to support a python distribution on MacOS using delocate. The wheels rely on libraries installed when gcc is installed using Homebrew.
brew install -v gcc#10
/usr/local/Cellar/gcc/10.2.0_3/lib/gcc/10/libstdc++.6.dylib
/usr/local/lib/gcc/10/libgcc_s.1.dylib
When running delocate-wheel with verbose option, the above are the two libraries included in the wheel.
If I use pip to install the original wheel, I can run the program without issue.
After running delicate-wheel and installing the new de-located wheel and trying to run, I produce this error:
python(66449,0x105ea3dc0) malloc: *** error for object 0x1071c3b60: pointer being freed was not allocated
python(66449,0x105ea3dc0) malloc: *** set a breakpoint in malloc_error_break to debug
I have tried using the require-archs=intel, but this errors out, and it appears that I only have single architecture files: Non-fat file: /usr/bin/python is architecture: x86_64
thank you,
I am trying to install nlopt onto macOS 10.15.5. I downloaded the nlopt-2.6.2.tar.gz file from the NLopt docs and ran the following from the nlopt-2.6.2 directory:
mkdir build
cd build
cmake -DNLOPT_OCTAVE=Off -DNLOPT_MATLAB=Off -DNLOPT_GUILE=Off ..
make
sudo make install
I got the following output: cmake.txt.
The header file (nlopt.h) installs correctly to /usr/local/include and the dynamic library (libnlopt.dylib) installs correctly to /usr/local/lib/, but neither the dist-info file nor the nlopt module itself installs.
I have also tried installing via pip, brew, and conda, none of which have worked. I have also tried cloning from this Github, which didn't work either.
I appreciate any help with this, because I am completely lost. I am relatively new to this kind of stuff, and I couldn't find any good answers online.
The official docs are somewhat laconic about the exact steps required for building nlopt with Python bindings. First of all, you'll need SWIG installed:
$ brew install swig
Then, you'll need numpy to be available for the target Python interpreter. It is already preinstalled for the system Python, otherwise install it via Homebrew or pip, depending on your Python installation.
Now run cmake:
$ cmake -DNLOPT_GUILE=OFF -DNLOPT_MATLAB=OFF -DNLOPT_OCTAVE=OFF -DNLOPT_TESTS=OFF
This will build bindings against the default Python 2.7 installation preinstalled on MacOS. If you need to build against custom Python installation (e.g. when you've installed Python 3 via Homebrew or PKG installer from https://www.python.org/downloads), pass it via the PYTHON_EXECUTABLE arg:
$ cmake -DNLOPT_GUILE=OFF -DNLOPT_MATLAB=OFF -DNLOPT_OCTAVE=OFF -DNLOPT_TESTS=OFF -DPYTHON_EXECUTABLE=/usr/local/bin/python3
Inspect the log now - Python, SWIG and numpy headers should be successfully located. Example output snippet (you may have different paths/versions printed):
-- Found PythonInterp: /usr/local/bin/python3.8 (found version "3.8.3")
-- Found PythonLibs: /Library/Frameworks/Python.framework/Versions/3.8/lib/libpython3.8.dylib (found suitable exact version "3.8.3")
-- Found NumPy: /Users/hoefling/Library/Python/3.8/lib/python/site-packages/numpy/core/include (found version "1.19")
-- Found SWIG: /usr/local/bin/swig (found version "4.0.2")
If any of those conditions is not satisfied (e.g. you see Could NOT find NumPy, Could NOT find PythonLibs or Could NOT find SWIG), then stop and make sure the configuration succeeds before proceeding next.
Now compile:
$ make
...
Scanning dependencies of target nlopt_python_swig_compilation
[ 96%] Swig compile nlopt.i for python
[ 96%] Built target nlopt_python_swig_compilation
Scanning dependencies of target nlopt_python
[ 98%] Building CXX object src/swig/CMakeFiles/nlopt_python.dir/CMakeFiles/nlopt_python.dir/nloptPYTHON_wrap.cxx.o
[100%] Linking CXX shared module _nlopt.so
[100%] Built target nlopt_python
Install:
$ make install
...
-- Installing: /usr/local/lib/python3.8/site-packages/nlopt.py
-- Installing: /usr/local/lib/python3.8/site-packages/_nlopt.so
Test the Python bindings are importable:
$ python -c "import nlopt; print(nlopt.__version__)"
2.6.2
This is what happens when I try to install py3cairo (because it is already installed):
brew install py3cairo
Updating Homebrew...
Warning: py3cairo 1.10.0_3 is already installed
brew upgrade py3cairo
Updating Homebrew...
Error: py3cairo 1.10.0_3 already installed
And, yet, when I run the configure batch file for pygobject 3, this is what I get the following output:
checking for pkg-config... /opt/local/bin/pkg-config
checking pkg-config is at least version 0.16... yes
checking for GLIB - version >= 2.38.0... yes (version 2.52.3)
checking for FFI... yes
checking for GIO... yes
checking for GI... yes
checking for gobject-introspection... yes
checking for CAIRO... yes
checking for PYCAIRO... no
configure: error: Package requirements (py3cairo >= 1.11.1
) were not met:
No package 'py3cairo' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables PYCAIRO_CFLAGS
and PYCAIRO_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
The package requirement is that py3cairo >= 1.11.1, but I've tried uninstalling py3cairo with brew and reinstalling it, and it still always installs 1.10.0_3, which makes me think this must be the highest version for mac.
What do I do to get pygobject3 to install on my Mac Seirra?
configure: error: Package requirements (py3cairo >= 1.11.1
https://github.com/Homebrew/homebrew-core/blob/master/Formula/py3cairo.rb#L4
url "https://cairographics.org/releases/pycairo-1.10.0.tar.bz2"
Version is just too old.
I get the error (Ubuntu 14.04):
sudo gem install
jekyllBuilding native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.1.0/gems/ffi-1.9.14 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/x86_64-linux/2.1.0/ffi-1.9.14/gem_make.out
Common solutions like installing ruby-dev are not working.
Please help.Thanks.
I would like to install the ephem package in my Python 3.3.0 version under Windows XP.
I tried first the pip install ephem route from the system command prompt. The process aborted with the error message of Unable to find vcvarsall.bat.
I read prior advice on the net for such a difficulty. Following it I installed mingw32 in my computer, added C:\MinGW\bin to the PATH variable and provided Lib / distutils with a new file called distutils.cfg and the content:
[build]
compiler=mingw32
On running now any of the install commands (pip, *easy_install* and setup.py all work the same) the following error results:
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Ilibastro-3.7.5 -IC:\Python33\
include -IC:\Python33\include -c extensions/_libastro.c -o build\temp.win32-3.3\
Release\extensions\_libastro.o
cc1.exe: error: unrecognised command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1
I have tried to understand and solve the problem, but have been unsuccesful. I have not been able even to find the place in the code where such values are established.
¿Could somebody provide any help? ¿Would ephem be one of the cases alluded by Installing Python modules in the 3.3.0 Documentation with "Not all extensions can be built with MinGW or Cygwin, but many can."?
Thanks in advance
Paco
Here is an extremely useful page of Windows binaries of python packages: http://www.lfd.uci.edu/~gohlke/pythonlibs/.
It includes binaries for pyephem.