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.

Allow cq-editor to run using python 3.8

See original GitHub issue

I tried and wasn’t successful, @adam-urbanczyk any suggestions?

As I posted here, I was able to get cadquery running with python 3.8. So I thought I’d see if I could get CQ-editor working too.

I installed cadquery using conda env create -n cq-dev2 -f environment.yml by modifing environment.yml specifying python 3.8:

wink@3900x:~/prgs/CadQuery/forks/cadquery (master)
$ git diff environment.yml
diff --git a/environment.yml b/environment.yml
index 2cb5548..44f28b9 100644
--- a/environment.yml
+++ b/environment.yml
@@ -4,8 +4,8 @@ channels:
   - conda-forge
   - defaults
 dependencies:
-  - python>=3.6
-  - ipython=6.5.0
+  - python>=3.8
+  - ipython
   - ocp
   - pyparsing
   - sphinx=2.4

I then tested “box.py” using a python 3.8 feature where you can easily print values using this syntax: f"{result=}"

(cq-dev2) wink@3900x:~/prgs/CadQuery/projects/box
$ cat box.py
import cadquery as cq
result = cq.Workplane("front").box(2.0, 2.0, 0.5)
print(f"{result=}")

(cq-dev2) wink@3900x:~/prgs/CadQuery/projects/box
$ python box.py
result=<cadquery.cq.Workplane object at 0x7f45285826a0>

For CQ-editor I modifed cqgui_env.yaml:

(cq-dev2) wink@3900x:~/prgs/CadQuery/forks/CQ-editor (master)
$ git diff
diff --git a/cqgui_env.yml b/cqgui_env.yml
index 00908eb..8ab12b0 100644
--- a/cqgui_env.yml
+++ b/cqgui_env.yml
@@ -4,16 +4,16 @@ channels:
   - defaults
   - conda-forge
 dependencies:
-  - pyqt=5.9.2
+  - pyqt
   - pyparsing
-  - pyqtgraph=0.10.0
-  - python=3.7
-  - spyder=3.3.4
-  - ocp=7.4
+  - pyqtgraph
+  - python>=3.8
+  - spyder
+  - ocp
   - path.py
   - logbook
-  - qtconsole=4.4.4
-  - jupyter_client=5.3.4
+  - qtconsole
+  - jupyter_client
   - requests
   - nomkl
   - ezdxf

And then tried conda env update --name cq-dev2 --file cqgui_env.yml, but that failed miserably, see a shortened snippet below:

(cq-dev2) wink@3900x:~/prgs/CadQuery/forks/CQ-editor (master)
$ conda env update --name cq-dev2 --file cqgui_env.yml 
Collecting package metadata (repodata.json): done
Solving environment: \ 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                                  -                                                                                     |  
Solving environment: \ 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                                                                                                                        |  

UnsatisfiableError: The following specifications were found to be incompatible with a past
explicit spec that is not an explicit spec in this operation (pip):

  - ezdxf -> pyparsing[version='>=2.0.1'] -> python[version='2.7.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.5,<3.6.0a0|3.4.*']
  - ezdxf -> python[version='>=3.5|>=3.6']
  - ezdxf -> python[version='>=3.6'] -> pip
  - jupyter_client -> python[version='2.7.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.5|>=3.8,<3.9.0a0|>=3.7,<3.8.0a0|>=3.6,<3.7.0a0|>=3.5,<3.6.0a0|3.4.*']
...

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
greyltccommented, Sep 7, 2020

Hey @darrellenns, I maintain the cadquery packages in the AUR, and coincidentally (or maybe not 😉) I made pr 177 and 175.

I’ve just applied those two patches to the -git flavor of the cq-editor package, so I expect that package should now work for you out-of-the-box with no mods. 🎉

1reaction
darrellennscommented, Sep 2, 2020

It runs for me with python-3.8 using the pkgbuild in arch aur. Since the pkbuild doesn’t use conda, I think this is likely avoiding whatever pinned packages are not 3.8 compatible. I did need to apply pull requests #177 and #175 to get it to run though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Install Python 3.8 on Windows 10 - Setup your Code Editor
Install Python Windows - 8 of 10 - Setup your Code EditorPython on Windows Install GUIDE: ...
Read more >
IDLE — Python 3.11.1 documentation
IDLE may open editor windows when it starts, depending on settings and how you start IDLE. Thereafter, use the File menu. There can...
Read more >
How to Run Your Python Scripts? Python for Beginners
The simplest way to start the interpreter is to open the terminal and then use the interpreter from the command line. To open...
Read more >
Connecting Python 3.8 with Xcode 11 | Apple Developer Forums
. Click Next and save it. Open scheme editor, select Run from the left hand pane, and Info tab from the detail pane....
Read more >
Getting Started With Python IDLE
Unfortunately, IDLE does not allow you to install custom themes from a file. You have to create customs theme from this window. To...
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