question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Expected in: flat namespace occuring out of the blue

See original GitHub issue

Hi. When I download pyproj (MAC M1 chip, Big Sur 11.0.1) on python in a VENV folder it works originally then always seems to come up with the following error:

Traceback (most recent call last):
  line 3, in <module>
  File "/Users/jackbarrett/Documents/Uni/2022sem1/Spatial info programming/code/A1(current)/venv/lib/python3.8/site-packages/pyproj/__init__.py", line 49, in <module>
    import pyproj.network
  File "/Users/jackbarrett/Documents/Uni/2022sem1/Spatial info programming/code/A1(current)/venv/lib/python3.8/site-packages/pyproj/network.py", line 10, in <module>
    from pyproj._network import (  # noqa: F401 pylint: disable=unused-import
[ImportError: dlopen(/Users/jackbarrett/Documents/Uni/2022sem1/Spatial info programming/code/A1(current)/venv/lib/python3.8/site-packages/pyproj/_network.cpython-38-darwin.so, 2): Symbol not found: _proj_context_is_network_enabled](https://www.google.com/search?q=python%20ImportError:%20dlopen(/Users/jackbarrett/Documents/Uni/2022sem1/Spatial%20info%20programming/code/A1(current)/venv/lib/python3.8/site-packages/pyproj/_network.cpython-38-darwin.so,%202):%20Symbol%20not%20found:%20_proj_context_is_network_enabled)
  Referenced from: /Users/jackbarrett/Documents/Uni/2022sem1/Spatial info programming/code/A1(current)/venv/lib/python3.8/site-packages/pyproj/_network.cpython-38-darwin.so
  Expected in: flat namespace
 in /Users/jackbarrett/Documents/Uni/2022sem1/Spatial info programming/code/A1(current)/venv/lib/python3.8/site-packages/pyproj/_network.cpython-38-darwin.so

Really frustrating me, any ideas. Thanks. I have the latest proj downloaded with brew and pyproj via pip

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jannismaincommented, May 11, 2022

Yes, I also wondered about that.

So next step would be to ignore the wheel, right?

pip install pyproj --no-binary :all:

I’m getting a weird ascii decode error within pip, so I disable PEP517 for legacy build behaviour:

$ pip install pyproj --no-binary :all: --no-use-pep517
Collecting pyproj
  Using cached pyproj-3.3.1.tar.gz (219 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: certifi in /Users/mkj/.pyenv/versions/pypy3.9-7.3.8/envs/atria-pypy/lib/pypy3.9/site-packages (from pyproj) (2021.10.8)
Skipping wheel build for pyproj, due to binaries being disabled for it.
Installing collected packages: pyproj
  Running setup.py install for pyproj ... done
Successfully installed pyproj-3.3.1

However I’m hitting the same issue as before: ImportError ... pyproj/_network.pypy39-pp73-darwin.so, 0x0006): symbol not found in flat namespace '_proj_context_is_network_enabled'

0reactions
dusvyatcommented, Jun 30, 2022

Any solution to this? I am running into same issue with Mac M1 Monterey

import pyproj

Traceback (most recent call last):
  File "/Users/d/PycharmProjects/nugen-core/nugen-zehs-haulroutes/venv/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 3397, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-3-98cb605ea9de>", line 1, in <cell line: 1>
    import pyproj
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "/Users/d/PycharmProjects/nugen-core/nugen-zehs-haulroutes/venv/lib/python3.9/site-packages/pyproj/__init__.py", line 49, in <module>
    import pyproj.network
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "/Users/d/PycharmProjects/nugen-core/nugen-zehs-haulroutes/venv/lib/python3.9/site-packages/pyproj/network.py", line 10, in <module>
    from pyproj._network import (  # noqa: F401 pylint: disable=unused-import
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
ImportError: dlopen(/Users/d/PycharmProjects/nugen-core/nugen-zehs-haulroutes/venv/lib/python3.9/site-packages/pyproj/_network.cpython-39-darwin.so, 0x0002): symbol not found in flat namespace '_proj_context_is_network_enabled'
Read more comments on GitHub >

github_iconTop Results From Across the Web

What does "Symbol not found / Expected in: flat namespace ...
It means the symbol wasn't found. · @immibis I think that gcc expected gcc code and it found clang code instead, and that...
Read more >
macOS | Apple Developer Forums
It is a very simple app that just draws a blue screen but when ran on Catalina, ... not found: _TF_AllocateOutput, Expected in:...
Read more >
XSL Transformations (XSLT) Version 3.0 - W3C
By default, dynamic errors occurring during streamed processing are fatal: they typically cause the transformation to fail immediately.
Read more >
Dell EMC PowerEdge Servers Troubleshooting Guide
How to find out missing licenses. ... Troubleshooting blue screen errors or ... Damage due to servicing that is not authorized by Dell...
Read more >
KEPServerEX Manual - Kepware
OS Error = '<error reason>'. 284. The OPC .NET server failed to start because it is not installed. Please rerun the installation. 284....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found