CadQuery / cadquery

A python parametric CAD scripting framework based on OCCT
https://cadquery.readthedocs.io
Other
2.93k stars 276 forks source link

For a complete new python venv environment, there is no ipython dependency installation through the command "pip install cadquery". #1543

Closed huskier closed 3 months ago

huskier commented 3 months ago

For a complete new python venv environment, there is no ipython dependency installation through the command "pip install cadquery". I have to manully install ipython to make some codes work.

I've looked the file of setup.py, "ipython" is in the extras_require list.

    extras_require={
        "dev": [
            "docutils",
            "ipython",
            "pytest",
            "black@git+https://github.com/cadquery/black.git@cq",
        ],
        "ipython": ["ipython",],
    },

Another package dependent question is that where the vtkmodules dependency is explicitly written in the file of setup.py to support cadquery.vis?

@jmwright Jeremy, could you please reopen the issue of #1538, there are still some issues unresolved for me.

adam-urbanczyk commented 3 months ago

cadquery-ocp provides vtk. There is no hard dep on ipython AFAIK.

huskier commented 3 months ago

cadquery-ocp provides vtk.

Thanks, I've gotten it.

The ipython dependency is introduced by vis.py. The following is the traceback.

(cpvenv) (base) E:\software\hobbies\CAD\CadQuery\tests>python AxisConstraints.py Traceback (most recent call last): File "E:\software\hobbies\CAD\CadQuery\tests\AxisConstraints.py", line 3, in from cadquery.vis import show File "E:\software\hobbies\CAD\cpvenv\Lib\site-packages\cadquery\vis.py", line 3, in from .occ_impl.jupyter_tools import DEFAULT_COLOR File "E:\software\hobbies\CAD\cpvenv\Lib\site-packages\cadquery\occ_impl\jupyter_tools.py", line 4, in from IPython.display import Javascript ModuleNotFoundError: No module named 'IPython'

adam-urbanczyk commented 3 months ago

FYI vis is for now experimental and meant for devs. It should not depend on ipython, so opening an issue.