Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run.bat missing from cq-editor installation on windows #1787

Closed
gitterman opened this issue Mar 10, 2025 · 11 comments
Closed

run.bat missing from cq-editor installation on windows #1787

gitterman opened this issue Mar 10, 2025 · 11 comments

Comments

@gitterman
Copy link

gitterman commented Mar 10, 2025

I successfully installed cq-editor as described in https://cadquery.readthedocs.io/en/latest/installation.html#installation.
Alas, there is no C:\Users<username>\cq-editor\run.bat in the installation directory.
There is also no conda.exe, but a _conda.exe, which makes me suppose that there is some post installation missing.
So, what is the next step to get cq-editor running?

C:\Users\PeterK\cq-editor
>dir *.bat *.exe
 Directory of C:\Users\PeterK\cq-editor

09.03.2025  04:09        21,111,455 _conda.exe
09.03.2025  04:09                47 pre_uninstall.bat
10.03.2025  15:07                90 pylupdate5.bat
10.03.2025  15:07                86 pyrcc5.bat
04.03.2025  23:39            93,184 python.exe
04.03.2025  23:39            91,648 pythonw.exe
10.03.2025  15:07                85 pyuic5.bat
10.03.2025  15:11           338,078 Uninstall-CQ-editor.exe     
@jmwright
Copy link
Member

I'm not sure that is happening with the installer in Windows. Are you able to install via conda or pip for now?

@gitterman
Copy link
Author

I did try to install via pip, but it failed, because my python installation is 3.13.1 which is not supported by cq.
The installation via miniforge3 also failed to install for everyone as well as for my user only.
conda-forge/miniforge#735
I also tried with conda, miniconda and microconda, but did not succeed.
So I tried the latest windows installation packet and was happy that it went through without errors.
But then, some parts to actually run the cq-editor are obviously missing, so I am stuck again.

@jmwright
Copy link
Member

Can you try to manually run the command inside the bat file?

https://github.com/CadQuery/CQ-editor/blob/master/conda/run.bat

@gitterman
Copy link
Author

As I wrote, there is no conda.exe.
After my failed attempts, I did cleanup everything before I ran the cq-editor installer.
Now there is only a _conda.exe in the cq installation dir, but no conda.exe in the Scripts directory.
I did rename _conda.exe to conda.exe and tried the script line from a command shell, but no success

C:\Users\PeterK\cq-editor
>conda run -n base python Scripts\cq-editor-script.py

DirectoryNotACondaEnvironmentError: The target directory exists, but it is not a conda environment.
Use 'conda create' to convert the directory to a conda environment.
  target directory: T:\TMP\_MEI26962

@gitterman
Copy link
Author

The symptom resembles the symptoms which I saw when I tried to use the manual installation with miniforge, which is described on the cadquery installation page.
Does the cq-editor installer possibly wrap around the miniforge3 package and thus shows similar problems?

@jmwright
Copy link
Member

jmwright commented Mar 10, 2025

I do think the installer is built around miniforge3, but I did not create the installer, so I'm not 100% sure.

I think CadQuery 2.5.2 is the limiting factor for Python 3.13 support. You could try updating CadQuery to the latest in git and that may fix your 3.13 pip install.

pip install --upgrade git+https://github.com/CadQuery/cadquery.git

@adam-urbanczyk
Copy link
Member

The installer uses conda constructor, so the same tool as miniforge. If all fails you could use the built-in visualization facilities of CQ.

@adam-urbanczyk
Copy link
Member

Out of curiosity, did you try running via CMD (see https://cadquery.readthedocs.io/en/latest/installation.html#id2)?

@gitterman
Copy link
Author

I used the installer from https://github.com/CadQuery/CQ-editor/releases/download/nightly/CQ-editor-master-Windows-x86_64.exe
As I said, the installation went without errors.
But afterward there are missing some tools, namely there was only _conda.exe and no .bat files to run the virtual env for CQ.
I suppose there is some post installation script missing, possibly from the miniforge packet.
The drawback with the CQ viewer is, that there is no debugging/error window nor variable window.
I do not use the CQ-editor itself but write my programs with gvim, but it is very useful to have the other features from CQ-Editor.
I used to use an old version which worked but has some bugs (CadQuery/CQ-editor#482) but removed it to get an actual revision.
Since then, I am struggling to bring CQ-editor back to life again.

@gitterman
Copy link
Author

gitterman commented Mar 11, 2025

I removed everything from my last install and went to use the non-interactive command lines for windows as shown on the CQ install page to install cadquery in the first place.
The miniforge download worked, but the installation line gave an error.

>dir miniforge.exe
Directory of C:\Users\PeterK
11.03.2025  15:58        70,630,737 miniforge.exe

>start "" /wait miniforge.exe /InstallationType=JustMe /RegisterPython=0 /NoRegistry=1 /NoScripts=1 /S /D=%USERPROFILE%\Miniforge
Access is denied.

Windows said that the permissions on the downloaded file are incorrectly ordered, and I found no way to cure it.
So I downloaded the latest Miniforge3-24.11.3-0-Windows-x86_64.exe directly from github and ran that.

This time it worked, and also the activation did work and the rest of the installation of CQ with conda and mamba succeeded.
So the next step is to get CQ-editor installed within the CQ environment.
The CQ-Editor installation page says to run mamba install -c cadquery -c conda-forge cq-editor=master, but it doesn't say if this needs to be done inside the cq virtual environment or from the base environment.
I cannot find an explanation of the '-c' option for conda or mamba.

@jmwright
Copy link
Member

You run that within the CQ environment that you created. The -c option adds an Anaconda channel.

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

No branches or pull requests

3 participants