Skip to content
This repository has been archived by the owner on Dec 30, 2023. It is now read-only.

How does one import python-pcl in a virtual environment (MacOs)? #331

Open
mnshn opened this issue Nov 26, 2019 · 3 comments
Open

How does one import python-pcl in a virtual environment (MacOs)? #331

mnshn opened this issue Nov 26, 2019 · 3 comments

Comments

@mnshn
Copy link

mnshn commented Nov 26, 2019

I have python-pcl working properly "globally", that is: after successfully installing pcl and python-pcl, I can successfully import pcl in my python project.

However, I'd prefer to work in a virtual environment, using Python's venv. When I Install python-pcl in my virtual enviroment, the module no longer imports poperly, and instead I get an ImportError:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/pauldelange/meg/opm/opm-finder/venv/lib/python3.7/site-packages/pcl/__init__.py", line 2, in <module>
    from ._pcl import *
ImportError: dlopen(/Users/pauldelange/meg/opm/opm-finder/venv/lib/python3.7/site-packages/pcl/_pcl.cpython-37m-darwin.so, 2): Library not loaded: /usr/local/opt/qt/lib/QtWidgets.framework/Versions/5/QtWidgets
  Referenced from: /usr/local/opt/pcl/lib/libpcl_outofcore.1.9.dylib
  Reason: Incompatible library version: libpcl_outofcore.1.9.dylib requires version 5.12.0 or later, but QtWidgets provides version 5.7.0

Your Environment

  • Operating System and version:
    MacOS Catalina (10.15)
    Python 3.7.4
  • Compiler:
  • PCL Version:
    PCL 1.9.1 Green
    Python-pcl 0.3.0a1
  • Cython Version:
    0.29.14

Context

I am trying to run python-pcl in a (python) virtual environment (using venv) after activating the venv, and installing python pcl with pip

Expected Behavior

Given that globally -- not using venv -- the python-pcl package is properly imported, I would expect a successful import in my virtual environment also

Current Behavior

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/pauldelange/meg/opm/opm-finder/venv/lib/python3.7/site-packages/pcl/__init__.py", line 2, in <module>
    from ._pcl import *
ImportError: dlopen(/Users/pauldelange/meg/opm/opm-finder/venv/lib/python3.7/site-packages/pcl/_pcl.cpython-37m-darwin.so, 2): Library not loaded: /usr/local/opt/qt/lib/QtWidgets.framework/Versions/5/QtWidgets
  Referenced from: /usr/local/opt/pcl/lib/libpcl_outofcore.1.9.dylib
  Reason: Incompatible library version: libpcl_outofcore.1.9.dylib requires version 5.12.0 or later, but QtWidgets provides version 5.7.0

Code to Reproduce

1. python -m venv venv
2. source venv/bin/activate
3. pip install python-pcl
4. python -c 'import pcl'

Possible Solution

@davethejoy
Copy link

Having the same issue with conda, in my case libpcl_outofcore.1.9.dylib is nowhere to be found.
Tx in advance!

@xleEmesent
Copy link

Having the same issue in Ubuntu 18.04.5 LTS. Has anyone found a solution yet?

@where2go947
Copy link

#374 (comment)
Hope helps.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants