cadquery installation

17 views
Skip to first unread message

Islam M. Zaid

unread,
Apr 1, 2024, 9:46:33 AMApr 1
to CadQuery
I have installed cadquery in a conda vertual env, then I installed the cadquery package using this command " pip install git+https://github.com/CadQuery/cadquery.git". It was cloned sucessfully, but when I tried to import cadqury into a python code it gives this error """ ImportError Traceback (most recent call last) File c:\Users\pcname\anaconda3\envs\cq\Lib\site-packages\nlopt\nlopt.py:22, in swig_import_helper() 21 try: ---> 22 return importlib.import_module(mname) 23 except ImportError: File c:\Users\pcname\anaconda3\envs\cq\Lib\importlib\__init__.py:90, in import_module(name, package) 89 level += 1 ---> 90 return _bootstrap._gcd_import(name[level:], package, level) File <frozen importlib._bootstrap>:1387, in _gcd_import(name, package, level) File <frozen importlib._bootstrap>:1360, in _find_and_load(name, import_) File <frozen importlib._bootstrap>:1331, in _find_and_load_unlocked(name, import_) File <frozen importlib._bootstrap>:921, in _load_unlocked(spec) File <frozen importlib._bootstrap>:813, in module_from_spec(spec) File <frozen importlib._bootstrap_external>:1289, in create_module(self, spec) File <frozen importlib._bootstrap>:488, in _call_with_frames_removed(f, *args, **kwds)
...
88 break 89 level += 1 ---> 90 return _bootstrap._gcd_import(name[level:], package, level) ModuleNotFoundError: No module named '_nlopt' 

"""
I am using windows 10. Please, help me on that. Thanks

Jeremy Wright

unread,
Apr 1, 2024, 11:28:40 AMApr 1
to Islam M. Zaid, CadQuery
There is a known issue with nlopt installed via pip in Python 3.12, so you can try lowering your Python version if you are running 3.12.

Since you are using an Anaconda environment anyway, you could just use the [conda install](https://cadquery.readthedocs.io/en/latest/installation.html#conda) which should work with Python 3.12.

Regarding pip install from git, the dependencies are often not automatically installed when installing from git. Unless you need some unreleased feature of CadQuery, you can simply run this:

pip install cadquery

If you need the bleeding-edge version of CadQuery and the dependencies do not install, you can install the dependencies listed in setup.py.




--
cadquery home: https://github.com/CadQuery/cadquery
post issues at https://github.com/CadQuery/cadquery/issues
run it at home at : https://github.com/CadQuery/CQ-editor
---
You received this message because you are subscribed to the Google Groups "CadQuery" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cadquery+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cadquery/d7941c5e-c572-46f7-bd71-f0aa4200283bn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages