Coder Social home page Coder Social logo

Comments (12)

koenbollen avatar koenbollen commented on June 12, 2024 18

I had the same issue.

My workaround:

$ brew install zlib
$ export LDFLAGS="-L/usr/local/opt/zlib/lib"
$ export CPPFLAGS="-I/usr/local/opt/zlib/include"
$ export PKG_CONFIG_PATH="/usr/local/opt/zlib/lib/pkgconfig"
$ export KEEP_BUILD_PATH=true
$ asdf install python 3.7.1

(this succeeds for me)

from asdf-python.

esselius avatar esselius commented on June 12, 2024 6

Using mac os 10.14 Mojave

Not sure what fixed this for me, but I ran these things in this order:

$ asdf install python 3.7.1
# FAIL: "Missing the zlib?"

$ sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
$ asdf install python 3.7.1
# FAIL: "Missing the OpenSSL lib?"

$ brew install -s python
# FAIL: "Please reinstall readline. Sorry :("

$ brew reinstall readline
$ brew install -s python
# SUCCESS

$ brew uninstall python
$ asdf install python 3.7.1
# SUCCESS

from asdf-python.

jamilbk avatar jamilbk commented on June 12, 2024 6

When you install zlib from Homebrew it gives you a hint:

% brew install zlib
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
No changes to formulae.

==> Downloading https://homebrew.bintray.com/bottles/zlib-1.2.11.mojave.bottle.tar.gz
Already downloaded: /Users/jamil/Library/Caches/Homebrew/downloads/01ac92cf18f86708cd068eaf9a3594a15b31861eca1e4d6718563d5e27acd6b2--zlib-1.2.11.mojave.bottle.tar.gz
==> Pouring zlib-1.2.11.mojave.bottle.tar.gz
==> Caveats
zlib is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

For compilers to find zlib you may need to set:
  export LDFLAGS="-L/usr/local/opt/zlib/lib"
  export CPPFLAGS="-I/usr/local/opt/zlib/include"

==> Summary
🍺  /usr/local/Cellar/zlib/1.2.11: 12 files, 373KB

So on my Mac with 10.14.1 I just needed the following:

export LDFLAGS="-L/usr/local/opt/zlib/lib"
export CPPFLAGS="-I/usr/local/opt/zlib/include"
asdf install python 3.6.7

from asdf-python.

mividtim avatar mividtim commented on June 12, 2024 6

@danhper The fix everyone is using for python-build is to export LDFLAGS and CPPFLAGS env vars to point to zlib installed with Homebrew, and re-run the Python install. However, running this plugin, it seems that these env vars are ignored - it always uses the zlib from xcode:

python-build: use zlib from xcode sdk

This seems like it's in your court to fix. asdf-python won't work on a brand-new Mac laptop. Will you help us out, or just point the finger elsewhere?

from asdf-python.

evantravers avatar evantravers commented on June 12, 2024 5

I also am getting similar problems…

❯ asdf install python 3.7.1
python-build 3.7.1 /Users/evan/.asdf/installs/python/3.7.1
python-build: use openssl from homebrew
python-build: use readline from homebrew
Downloading Python-3.7.1.tar.xz...
-> https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tar.xz
Installing Python-3.7.1...
python-build: use readline from homebrew
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?

Please consult to the Wiki page to fix the problem.
https://github.com/pyenv/pyenv/wiki/Common-build-problems


BUILD FAILED (OS X 10.14 using python-build 1.2.8)

Inspect or clean up the working tree at /var/folders/5_/f2f8clnd4zd7gd6tf7zm4jn00000gn/T/python-build.20181105161823.78561
Results logged to /var/folders/5_/f2f8clnd4zd7gd6tf7zm4jn00000gn/T/python-build.20181105161823.78561.log

Last 10 log lines:
			install|*) ensurepip="" ;; \
		esac; \
		 ./python.exe -E -m ensurepip \
			$ensurepip --root=/ ; \
	fi
Looking in links: /var/folders/5_/f2f8clnd4zd7gd6tf7zm4jn00000gn/T/tmp0ib4qurm
Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-10.0.1 setuptools-39.0.1

from asdf-python.

koenbollen avatar koenbollen commented on June 12, 2024 5

@evantravers Try installing openssl from homebrew using brew install openssl. Might do the trick.

from asdf-python.

Virviil avatar Virviil commented on June 12, 2024 2

Here is the solution that worked for me:

pyenv/pyenv#1737 (comment)

So it's possible to add the flag to asdf also:

CFLAGS=-Wno-implicit-function-declaration asdf install python 3.6.0

from asdf-python.

geowa4 avatar geowa4 commented on June 12, 2024

Thanks, that worked for me as well!

from asdf-python.

dipnlik avatar dipnlik commented on June 12, 2024

I was having the SSL issue even after trying brew reinstall readline and other suggestions and brew reinstall -s python solved it, even without brew uninstall python. Not sure if -s was really required or not.

Noticed that brew install python also installs pkg-config so maybe this package is related to the issue? It is a little weird having to install Homebrew's python to be able to install asdf's python.

from asdf-python.

MrPaulAR avatar MrPaulAR commented on June 12, 2024

I too am having issues and hoping someone sees the error in my ways.

asdf install python 3.6.8                                                                                                        1247ms  Fri Jan  4 10:53:13 2019
python-build 3.6.8 /Users/paulthomas/.asdf/installs/python/3.6.8
python-build: use openssl from homebrew
python-build: use readline from homebrew
Downloading Python-3.6.8.tar.xz...
-> https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tar.xz
Installing Python-3.6.8...
python-build: use readline from homebrew

BUILD FAILED (OS X 10.14.2 using python-build 1.2.8-12-g775a4b63)

Inspect or clean up the working tree at /var/folders/lf/zzyy185j7bzd9c540qp_46ww0000gp/T/python-build.20190104105327.83497
Results logged to /var/folders/lf/zzyy185j7bzd9c540qp_46ww0000gp/T/python-build.20190104105327.83497.log

Last 10 log lines:
      _test_repeated_init_and_subinterpreters in _testembed.o
  "_Py_SetProgramName", referenced from:
      _test_forced_io_encoding in _testembed.o
      _test_repeated_init_and_subinterpreters in _testembed.o
      _test_pre_initialization_api in _testembed.o
  "_Py_SetStandardStreamEncoding", referenced from:
      _test_forced_io_encoding in _testembed.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Programs/_testembed] Error 1

Below are the steps that I've done
I've set the build flags as defined above for LDFLAGS, CPPFLAGS, PKG_CONFIG_PATH, & KEEP_BUILD_PATH
Reinstalled zlib (brew reinstall zlib)
Reinstalled pythong (brew reinstall -s python)
Ran brew doctor and fixed findutils

I'm still getting the same error.

I can download the tarball from python's website and successfully compile it. I didn't install.

from asdf-python.

pikeas avatar pikeas commented on June 12, 2024

Same issue under Mojave 10.14.2 when install Python 3.7.2. Tinkered with adding openssl/zlib via homebrew and various compiler flags but it wasn't enough. I eventually gave up and installed Python via homebrew instead of asdf.

from asdf-python.

danhper avatar danhper commented on June 12, 2024

asdf-python is simply wrapping pyenv's python-build.
For build errors, please check pyenv issue tracker.
If it works with python-build but not with asdf-python please open another issue or comment here.

from asdf-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.