system conan install

271 views
Skip to first unread message

Scott Carnahan

unread,
Jan 25, 2022, 2:25:15 PM1/25/22
to Basilisk Forum
I recently had to install bsk2 on a shared server where conan was installed globally. We are using conda venvs as well.

I had the problem that conan wouldn't run because it said the version was too old, despite pip installing the latest. It turns out the first call to the conanfile was referencing my python version of conan, but all later calls were referencing the system version. To guarantee that the conan installed during bsk installation instructions is used, I recommend please changing the following lines to us


[around line 350]
conanCmdString.append(conan install . --build=missing')
becomes
conanCmdString.append('python -m conans.conan install . --build=missing')

[around line 377]
cmakeCmdString = 'conan build . -if ' + buildFolderName
becomes
cmakeCmdString = 'python -m conans.conan build . -if ' + buildFolderName

In addition, please note that the check for if the user is using a virtual environment (is_running_virtual_env) does not seem to work if users are using conda venvs. I had to comment out the --user in add_basilisk_to_sys_path to make the bsk install available to other users even with my conda environment activated.

Keep up the good work
-Scott

Hanspeter Schaub

unread,
Jan 25, 2022, 10:29:47 PM1/25/22
to Basilisk Forum
Howdy Scott,
Thanks for the tip on making BSK use the conan install for this version of python.  I've seen this issue before on Windows where the stand alone conan program used a different version than the pip installed conan version.  I'll take a look at this and try across the platforms.

Blue Skies, Hanspeter Schaub

Hanspeter Schaub

unread,
Jan 25, 2022, 10:35:35 PM1/25/22
to Basilisk Forum
Well, I tried this quickly and on my macBook I get this error.  I must be missing something obvious?

Running this conan command:

python -m conans.conan install . --build=missing -s build_type=Release -if dist3/conan -o opNav=True -o vizInterface=True -o buildProject=False -o clean=True

/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: No module named conans

Running cmake:

python -m conans.conan build . -if dist3/conan

/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: No module named conans


Scott Carnahan

unread,
Feb 6, 2022, 4:06:04 PM2/6/22
to Basilisk Forum
Hmm, it seems that in your case the `python -m` is calling python2 instead of python3. if we are fully switched to python3 now, then it should work for everyone by changing to `python3 -m conans.conan build` or `python3 -m conans.conan install`

Hanspeter Schaub

unread,
Feb 7, 2022, 9:31:52 AM2/7/22
to Basilisk Forum
Mm, you're correct,  I didn't catch that.  I'll play with this some more when I get a chance.
Reply all
Reply to author
Forward
0 new messages