qualisys / paf-opensim-example

Example for using OpenSim with the QTM Project Automation Framework
https://www.qualisys.com/software/project-automation-framework/
MIT License
5 stars 1 forks source link

Getting error in environment activation #6

Open bibiayisha opened 2 months ago

bibiayisha commented 2 months ago

When i run this: conda env create -f environment.yml

I get the error: CondaError: Run 'conda init' before 'conda activate'

when i run conda init it does nothing, my env vars are set, everything is on right place.

AndreyAkse commented 2 months ago

Could you try those steps:

  1. install miniconda https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe when installing miniconda tick 'Add Miniconda3 to my PATH environment variable'
  2. run anaconda prompt (press start and type anaconda prompt) then separately run each line (copy, paste and enter): conda create -n opensim_example python=3.8 conda activate opensim_example conda install -c opensim-org opensim pip install pandas pip install scipy pip install matplotlib
bibiayisha commented 2 months ago

Thank you for your response. I have tried everything again but getting the same error: CondaError: Run 'conda init' before 'conda activate'

It creates environment but does not activate it. And running conda init doesnot resolve this issue.

AndreyAkse commented 2 months ago

Hello again :). Did you try to activate your environment opensim_example using command line? You could try just to run python script from there using ‘Converting files from Anaconda Prompt’ guideline https://github.com/qualisys/paf-opensim-example. Unfortunately, we do not support python and conda environment issues as it is not our product. There could be many problems related to that, maybe you installed different versions of different python software, environment variables path settings etc. Would be good to look on the internet for the solution. Usually, I run this script paf-opensim-example/Templates/qtm2opensim.py in Visual Studio code but setting up and activating opensim_example environment where all libraries are installed. And you can change def main () to this code and specify where your c3d files located and run it in Visual Code or somewhere else:

def main(): c3d_dir = r'D:\Opensim\toTRC\Data' for file_name in os.listdir(c3d_dir): if file_name.endswith('.c3d'): convert_c3d(c3d_dir, file_name)

if name == 'main': main()

Sorry, I cannot help with environment activation issue. If I had it in the past, I was deleting all python related software, reinstalling or changing in environment settings and path to python order. You can try install anaconda instead of miniconda and tick Registers as my default python for such as VSCode, pyCharm, etc. Or use another computer where you did not have any python projects.