Closed billtubbs closed 1 year ago
Same error here
@jmwright looks like an issue with the pip package?
@billtubbs install via conda
or with cadquery-ocp==7.5
In my case I want to install conda install statmodels
and I get
The following NEW packages will be INSTALLED:
patsy pkgs/main/linux-64::patsy-0.5.2-py39h06a4308_1
statsmodels pkgs/main/linux-64::statsmodels-0.13.0-py39h7f8727e_0
The following packages will be UPDATED:
certifi 2022.9.14-py39h06a4308_0 --> 2022.9.24-py39h06a4308_0
occt 7.5.3-hc019471_1 --> 7.6.2-h665cfa0_3
ocp conda-forge::ocp-7.5.3.0-py39h1c2f70e~ --> cadquery::ocp-7.6.2.alpha-py39_0
proj pkgs/main::proj-7.2.0-h1217e81_1 --> conda-forge::proj-8.2.0-h277dcde_0
vtk 9.0.1-qt_py39hd1b08ba_210 --> 9.1.0-no_osmesa_py39h62d5dbf_100
and then I get the BRepAdaptor_HCurve
error.
Probably related to #1168
I'll hopefully have time to fix this tomorrow.
In my case I want to install
conda install statmodels
and I getThe following NEW packages will be INSTALLED: patsy pkgs/main/linux-64::patsy-0.5.2-py39h06a4308_1 statsmodels pkgs/main/linux-64::statsmodels-0.13.0-py39h7f8727e_0 The following packages will be UPDATED: certifi 2022.9.14-py39h06a4308_0 --> 2022.9.24-py39h06a4308_0 occt 7.5.3-hc019471_1 --> 7.6.2-h665cfa0_3 ocp conda-forge::ocp-7.5.3.0-py39h1c2f70e~ --> cadquery::ocp-7.6.2.alpha-py39_0 proj pkgs/main::proj-7.2.0-h1217e81_1 --> conda-forge::proj-8.2.0-h277dcde_0 vtk 9.0.1-qt_py39hd1b08ba_210 --> 9.1.0-no_osmesa_py39h62d5dbf_100
and then I get the
BRepAdaptor_HCurve
error.
If you are using conda, then reinstall cadquery after clearing package cache: https://github.com/CadQuery/cadquery/wiki/Conda-tricks
@adam-urbanczyk reinstall cadquery after clearing package cache worked, thank you!
@billtubbs install via
conda
or withcadquery-ocp==7.5
I uninstalled with pip uninstall cadquery
and then reinstalled using:
conda install -c cadquery -c conda-forge cadquery=master
as explained in the documentation.
This seemed to work although I got some unusual warnings this time when running import cadquery
:
objc[62378]: Class vtkCocoaTimer is implemented in both /Users/<myusername>/opt/anaconda3/envs/occ/lib/libvtkRenderingUI-9.1.9.1.0.dylib (0x1155ac208) and /Users/<myusername>/opt/anaconda3/envs/occ/lib/python3.9/site-packages/vtkmodules/.dylibs/libvtkRenderingUI-9.1.9.1.0.dylib (0x17a62e208). One of the two will be used. Which one is undefined.
objc[62378]: Class vtkCocoaFullScreenWindow is implemented in both /Users/<myusername>/opt/anaconda3/envs/occ/lib/libvtkRenderingOpenGL2-9.1.9.1.0.dylib (0x114ef4618) and /Users/<myusername>/opt/anaconda3/envs/occ/lib/python3.9/site-packages/vtkmodules/.dylibs/libvtkRenderingOpenGL2-9.1.9.1.0.dylib (0x17a582548). One of the two will be used. Which one is undefined.
objc[62378]: Class vtkCocoaServer is implemented in both /Users/<myusername>/opt/anaconda3/envs/occ/lib/libvtkRenderingOpenGL2-9.1.9.1.0.dylib (0x114ef4640) and /Users/<myusername>/opt/anaconda3/envs/occ/lib/python3.9/site-packages/vtkmodules/.dylibs/libvtkRenderingOpenGL2-9.1.9.1.0.dylib (0x17a582570). One of the two will be used. Which one is undefined.
objc[62378]: Class vtkCocoaGLView is implemented in both /Users/<myusername>/opt/anaconda3/envs/occ/lib/libvtkRenderingOpenGL2-9.1.9.1.0.dylib (0x114ef4690) and /Users/<myusername>/opt/anaconda3/envs/occ/lib/python3.9/site-packages/vtkmodules/.dylibs/libvtkRenderingOpenGL2-9.1.9.1.0.dylib (0x17a5825c0). One of the two will be used. Which one is undefined.
Maybe my environment has become a bit too cluttered? (I was trying out a few different CAD packages).
Anyhow, the previous ImportError does not occur and cadquery seems to be working. Thanks.
Update: I started fresh by recreating a clean environment and installing cadquery with conda again and I don't get those package warnings as in above comment.
B.t.w. the only reason I installed initially using pip is that this is the first installation method listed in the ReadMe on the GitHub site. The conda install option is listed below that and so I missed it.
The install line pip install --pre cadquery
from the readme should work again.
I don't have a preference on whether the conda or pip install methods are at the top of the readme, but we've found from experience that there is no order that will please everyone.
TBH conda
is better supported and IMO it should be described first.
If someone wants to submit a PR to switch the order, or to work it into another PR, I'm not opposed to it.
I don't think the order is important but often pip is listed first. Maybe add the line "CadQuery can be installed using pip or conda" at the top of the installation section so readers at least realize the first option is not the only option.
Looks like my above comment has already been addressed! On the GitHub ReadMe at least.
This documentation page also has installation instructions which only mention conda at the moment:
Also, note that the following text appears in the bug report template:
Was CadQuery installed using Conda?: <!-- Note Conda is the only official installation method. If you are not using Conda, please provide details of your build/install/packaging methods, since they are often relevant to bugs and crashes. -->
To Reproduce
I installed CADquery for the first time using
The error occurs when I do the import in Python script or notebook
Environment
OS: