Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Emerge fails after python 3.5 reinstall
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
orion777
Apprentice
Apprentice


Joined: 15 Mar 2017
Posts: 197
Location: Riga, Latvia

PostPosted: Tue May 29, 2018 6:10 am    Post subject: Emerge fails after python 3.5 reinstall Reply with quote

I was reinstalling the python 3.5
Code:
# emerge -av =dev-lang/python-3.5.5-r1

Local copy of remote index is up-to-date and will be used.

These are the packages that would be merged, in order:

Calculating dependencies... done!
[binary   R    ] dev-lang/python-3.5.5-r1:3.5/3.5m::gentoo  USE="bluetooth gdbm ipv6 ncurses readline ssl (threads) xml -build -examples (-hardened) -libressl -sqlite {-test} -tk -wininst" 22,887 KiB

Total: 1 package (1 reinstall, 1 binary), Size of downloads: 22,887 KiB

Would you like to merge these packages? [Yes/No]
>>> Emerging binary (1 of 1) dev-lang/python-3.5.5-r1::gentoo
>>> Installing (1 of 1) dev-lang/python-3.5.5-r1::gentoo
>>> Recording dev-lang/python:3.5 in "world" favorites file...
>>> Jobs: 1 of 1 complete                           Load avg: 2.20, 1.52, 1.00
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.


After that emerge fails to operate with any package and returns same problem
Code:
emerge -av htop
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.5/emerge", line 51, in <module>
    retval = emerge_main()
  File "/usr/lib64/python3.5/site-packages/_emerge/main.py", line 1289, in emerge_main
    return run_action(emerge_config)
  File "/usr/lib64/python3.5/site-packages/_emerge/actions.py", line 2895, in run_action
    getbinpkgs='--getbinpkg' in emerge_config.opts)
  File "/usr/lib64/python3.5/site-packages/portage/dbapi/bintree.py", line 564, in populate
    self._populate_remote(getbinpkg_refresh=getbinpkg_refresh)
  File "/usr/lib64/python3.5/site-packages/portage/dbapi/bintree.py", line 883, in _populate_remote
    if parsed_url.scheme not in ('https',) or _have_pep_476():
  File "/usr/lib64/python3.5/site-packages/portage/proxy/objectproxy.py", line 31, in __call__
    return result(*args, **kwargs)
  File "/usr/lib64/python3.5/site-packages/portage/util/_urlopen.py", line 38, in have_pep_476
    return hasattr(__import__('ssl'), '_create_unverified_context')
  File "/usr/lib64/python3.5/ssl.py", line 99, in <module>
    import _ssl             # if we can't import it, let the error propagate
ImportError: /usr/lib64/python3.5/lib-dynload/_ssl.cpython-35m-aarch64-linux-gnu.so: undefined symbol: EC_KEY_new_by_curve_name


Is it possible to fix this problem, or I have to reinstall gentoo?
Back to top
View user's profile Send private message
Josef.95
Advocate
Advocate


Joined: 03 Sep 2007
Posts: 3921
Location: Germany

PostPosted: Tue May 29, 2018 4:22 pm    Post subject: Emerge fails after python 3.5 reinstall Reply with quote

Hm, try a proper rebuild (no a binary reinstall) with python2
Code:
EPYTHON=python2.7 emerge -av1 python:3.5
Back to top
View user's profile Send private message
orion777
Apprentice
Apprentice


Joined: 15 Mar 2017
Posts: 197
Location: Riga, Latvia

PostPosted: Tue May 29, 2018 8:09 pm    Post subject: Reply with quote

Thanx for the answer.
By running this command I'm also getting an error. (It should to be noted that before to run python 3.5 reinstall, the python 2.7 was reinstalled too)
Code:
pi64 ~ # EPYTHON=python2.7 emerge -av1 python:3.5
Traceback (most recent call last):
  File "/usr/lib/python-exec/python2.7/emerge", line 51, in <module>
    retval = emerge_main()
  File "/usr/lib64/python2.7/site-packages/_emerge/main.py", line 1289, in emerge_main
    return run_action(emerge_config)
  File "/usr/lib64/python2.7/site-packages/_emerge/actions.py", line 2895, in run_action
    getbinpkgs='--getbinpkg' in emerge_config.opts)
  File "/usr/lib64/python2.7/site-packages/portage/dbapi/bintree.py", line 564, in populate
    self._populate_remote(getbinpkg_refresh=getbinpkg_refresh)
  File "/usr/lib64/python2.7/site-packages/portage/dbapi/bintree.py", line 883, in _populate_remote
    if parsed_url.scheme not in ('https',) or _have_pep_476():
  File "/usr/lib64/python2.7/site-packages/portage/proxy/objectproxy.py", line 31, in __call__
    return result(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/portage/util/_urlopen.py", line 38, in have_pep_476
    return hasattr(__import__('ssl'), '_create_unverified_context')
  File "/usr/lib64/python2.7/ssl.py", line 98, in <module>
    import _ssl             # if we can't import it, let the error propagate
ImportError: /usr/lib64/python2.7/lib-dynload/_ssl.so: undefined symbol: EC_KEY_new_by_curve_name
pi64 ~ #
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1791

PostPosted: Tue May 29, 2018 10:59 pm    Post subject: Reply with quote

Just wondering, but what version of openssl do you have installed; as I suspect you may be using openssl-1.1* (which is masked and known to break stuff)
Back to top
View user's profile Send private message
orion777
Apprentice
Apprentice


Joined: 15 Mar 2017
Posts: 197
Location: Riga, Latvia

PostPosted: Wed May 30, 2018 5:37 am    Post subject: Reply with quote

Based on eix output, I have two "ssl" stuffs:
Code:
dev-libs/openssl
     Installed versions:  1.0.2o-r1{tbz2}(04:19:07 28/04/18)(asm bindist sslv3 tls-heartbeat zlib -gmp -kerberos -rfc3779 -sctp -sslv2 -static-libs -test -vanilla ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="-32 -64 -x32" CPU_FLAGS_X86="-sse2")


dev-python/pyopenssl
     Installed versions:  17.0.0(13:52:14 10/01/18)(-doc -examples -test PYTHON_TARGETS="python2_7 python3_5 -pypy -pypy3 -python3_4 -python3_6")

Also maybe it is significant: pip returns error with ssl, for example pip search and pip install:
Code:
pi64 ~ # pip search pymavlink
Exception:
Traceback (most recent call last):
  File "/usr/lib64/python3.5/site-packages/pip/_vendor/requests/adapters.py", line 423, in send
    timeout=timeout
  File "/usr/lib64/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 583, in urlopen
    conn = self._get_conn(timeout=pool_timeout)
  File "/usr/lib64/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 257, in _get_conn
    return conn or self._new_conn()
  File "/usr/lib64/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 808, in _new_conn
    raise SSLError("Can't connect to HTTPS URL because the SSL "
pip._vendor.requests.packages.urllib3.exceptions.SSLError: Can't connect to HTTPS URL because the SSL module is not available.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.5/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib64/python3.5/site-packages/pip/commands/search.py", line 45, in run
    pypi_hits = self.search(query, options)
  File "/usr/lib64/python3.5/site-packages/pip/commands/search.py", line 62, in search
    hits = pypi.search({'name': query, 'summary': query}, 'or')
  File "/usr/lib64/python3.5/xmlrpc/client.py", line 1092, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python3.5/xmlrpc/client.py", line 1432, in __request
    verbose=self.__verbose
  File "/usr/lib64/python3.5/site-packages/pip/download.py", line 775, in request
    headers=headers, stream=True)
  File "/usr/lib64/python3.5/site-packages/pip/_vendor/requests/sessions.py", line 522, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/usr/lib64/python3.5/site-packages/pip/download.py", line 386, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "/usr/lib64/python3.5/site-packages/pip/_vendor/requests/sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib64/python3.5/site-packages/pip/_vendor/requests/sessions.py", line 596, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib64/python3.5/site-packages/pip/_vendor/cachecontrol/adapter.py", line 47, in send
    resp = super(CacheControlAdapter, self).send(request, **kw)
  File "/usr/lib64/python3.5/site-packages/pip/_vendor/requests/adapters.py", line 497, in send
    raise SSLError(e, request=request)
pip._vendor.requests.exceptions.SSLError: Can't connect to HTTPS URL because the SSL module is not available.
Code:

pi64 ~ # pip install --user pymavlink
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting pymavlink
  Could not fetch URL https://pypi.python.org/simple/pymavlink/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
  Could not find a version that satisfies the requirement pymavlink (from versions: )
No matching distribution found for pymavlink
pi64 ~ #
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1791

PostPosted: Wed May 30, 2018 3:23 pm    Post subject: Reply with quote

Using pip as root is dangerous to do, as it is well known to kill portage hence why it is recommended you only run it as a regular user instead.

Beyond that, is is recommended you have the bindist USE flag disabled, as it is known to break stuff (disable it in your make.conf, not your package.use; as it needs to be set the same for several other packages too). It breaks stuff by disabling some patented code that is depended on by several packages. The USE flag means you want to distribute binary copies to other people (also why it is set by default, with Gentoo distributing the system images around).

You may want to try recompiling pyopenssl (if you recompile the same version you have installed, you shouldn't have an issue with ssl unless you removed the sources that was already downloaded to your distfiles folder).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum