4

I am trying to install pythonOCC. Their website says in order to download use conda/anaconda. Instructions are here: http://www.pythonocc.org/download/

Specifically it says to type this command:

$ conda install -c conda-forge -c dlr-sc -c pythonocc -c oce pythonocc-core==0.18.1

First, i installed conda.

When i tried to pass the directory of the installation to my %PATH%, i saw that the conda executable was not named conda.exe, but rather _conda.exe.

Therefore to start it from the command line, i would type _conda, which is different from what the instruction say.

Then i typed the previous command (replacing conda with _conda). I got this:

NoBaseEnvironmentError: This conda installation has no default base environment.
 Use
'conda create' to create new environments and 'conda activate' to activate environments.

I typed _conda activate and i got this:

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
If using 'conda activate' from a batch script, change your invocation to 'CALL conda.bat activate'.

To initialize your shell, run

    $ conda init <SHELL_NAME>

Currently supported shells are:
  - bash
  - cmd.exe
  - fish
  - tcsh
  - xonsh
  - zsh
  - powershell

See 'conda init --help' for more information and options.

IMPORTANT: You may need to close and restart your shell after running 'conda init'.

The i typed _conda init and this is what i got:

C:\Users\User1>_conda init
WARNING: Cannot install xonsh wrapper without a python interpreter in prefix: C:
\Users\User1\AppData\Local\Temp\_MEI60042
needs sudo    C:\Users\User1\AppData\Local\Temp\_MEI60042\Scripts\conda.exe
needs sudo    C:\Users\User1\AppData\Local\Temp\_MEI60042\Scripts\conda-env.exe
modified      C:\Users\User1\AppData\Local\Temp\_MEI60042\Scripts\conda-script.p
y
modified      C:\Users\User1\AppData\Local\Temp\_MEI60042\Scripts\conda-env-scri
pt.py
needs sudo    C:\Users\User1\AppData\Local\Temp\_MEI60042\condabin\conda.bat
needs sudo    C:\Users\User1\AppData\Local\Temp\_MEI60042\Library\bin\conda.bat
needs sudo    C:\Users\User1\AppData\Local\Temp\_MEI60042\condabin\_conda_activa
te.bat
needs sudo    C:\Users\User1\AppData\Local\Temp\_MEI60042\condabin\rename_tmp.ba
t
needs sudo    C:\Users\User1\AppData\Local\Temp\_MEI60042\condabin\conda_auto_ac
tivate.bat
needs sudo    C:\Users\User1\AppData\Local\Temp\_MEI60042\condabin\conda_hook.ba
t
needs sudo    C:\Users\User1\AppData\Local\Temp\_MEI60042\Scripts\activate.bat
needs sudo    C:\Users\User1\AppData\Local\Temp\_MEI60042\condabin\activate.bat
needs sudo    C:\Users\User1\AppData\Local\Temp\_MEI60042\condabin\deactivate.ba
t
needs sudo    C:\Users\User1\AppData\Local\Temp\_MEI60042\Scripts\activate
needs sudo    C:\Users\User1\AppData\Local\Temp\_MEI60042\Scripts\deactivate
needs sudo    C:\Users\User1\AppData\Local\Temp\_MEI60042\etc\profile.d\conda.sh

needs sudo    C:\Users\User1\AppData\Local\Temp\_MEI60042\etc\fish\conf.d\conda.
fish
needs sudo    C:\Users\User1\AppData\Local\Temp\_MEI60042\shell\condabin\Conda.p
sm1
needs sudo    C:\Users\User1\AppData\Local\Temp\_MEI60042\shell\condabin\conda-h
ook.ps1
needs sudo    C:\Users\User1\AppData\Local\Temp\_MEI60042\etc\profile.d\conda.cs
h
modified      C:\Users\User1\Documents\WindowsPowerShell\profile.ps1
modified      HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun

==> For changes to take effect, close and re-open your current shell. <==

Operation failed.

I then uninstalled conda and downloaded anaconda3, for which the exact same thing happened.

So, my question is, how to use either conda or anaconda, in order to download and install pythonOCC, in order to be used in python programs?

user1584421
  • 3,499
  • 11
  • 46
  • 86

0 Answers0