Issue with importing SpacecraftPlus

401 views
Skip to first unread message

Alex Horvath

unread,
Nov 23, 2020, 10:39:05 AM11/23/20
to Basilisk Forum
Hi Basilisk team!

I am currently trying to run through some of the example scripts provided (scenarioBasicOrbit.py) using python 3.7 and PyCharm on Windows 10. I am having an issue importing SpacecraftPlus. What is the correct location of SpacecraftPlus, or is that class deprecated? Is that a python file or a C/C++ file that should have been built? I think I built Basilisk correctly but I am not 100% sure.

Thanks for your help!

- Alex

Alex Horvath

unread,
Nov 23, 2020, 1:16:29 PM11/23/20
to Basilisk Forum
This is a really interesting project but the conan installation and complexities with swig and cmake make it difficult to even test to see if the system works for me. Is there a stable release or some kind of wheel available so I can just explore the project functionality?

Here is me installing conan and trying to run conanfile.py



C:\Users\Owner\AppData\Local\Programs\Python\Python37\Lib\site-packages\Basilisk>pip3 install conan
Collecting conan
    100% |████████████████████████████████| 634kB 6.1MB/s
Requirement already satisfied: PyJWT<2.0.0,>=1.4.0 in c:\users\owner\appdata\local\programs\python\python37\lib\site-packages (from conan) (1.7.1)
Requirement already satisfied: requests<3.0.0,>=2.8.1 in c:\users\owner\appdata\local\programs\python\python37\lib\site-packages (from conan) (2.23.0)
Requirement already satisfied: urllib3!=1.25.4,!=1.25.5,<1.26 in c:\users\owner\appdata\local\programs\python\python37\lib\site-packages (from conan) (1.25.8)
Requirement already satisfied: colorama<0.5.0,>=0.3.3 in c:\users\owner\appdata\local\programs\python\python37\lib\site-packages (from conan) (0.4.3)
Requirement already satisfied: PyYAML<6.0,>=3.11 in c:\users\owner\appdata\local\programs\python\python37\lib\site-packages (from conan) (5.3.1)
Collecting patch-ng<1.18,>=1.17.4 (from conan)
Collecting fasteners>=0.14.1 (from conan)
Requirement already satisfied: six<=1.15.0,>=1.10.0 in c:\users\owner\appdata\local\programs\python\python37\lib\site-packages (from conan) (1.12.0)
Collecting node-semver==0.6.1 (from conan)
Requirement already satisfied: distro<=1.5.0,>=1.0.2 in c:\users\owner\appdata\local\programs\python\python37\lib\site-packages (from conan) (1.5.0)
Requirement already satisfied: future<0.19.0,>=0.16.0 in c:\users\owner\appdata\local\programs\python\python37\lib\site-packages (from conan) (0.18.2)
Requirement already satisfied: pygments<3.0,>=2.0 in c:\users\owner\appdata\local\programs\python\python37\lib\site-packages (from conan) (2.6.1)
Collecting deprecation<2.1,>=2.0 (from conan)
Requirement already satisfied: tqdm<5,>=4.28.1 in c:\users\owner\appdata\local\programs\python\python37\lib\site-packages (from conan) (4.45.0)
Requirement already satisfied: Jinja2<3,>=2.9 in c:\users\owner\appdata\local\programs\python\python37\lib\site-packages (from conan) (2.11.1)
Requirement already satisfied: python-dateutil<3,>=2.7.0 in c:\users\owner\appdata\local\programs\python\python37\lib\site-packages (from conan) (2.8.1)
Collecting bottle<0.13,>=0.12.8 (from conan)
    100% |████████████████████████████████| 92kB 1.1MB/s
Collecting pluginbase>=0.5 (from conan)
Requirement already satisfied: chardet<4,>=3.0.2 in c:\users\owner\appdata\local\programs\python\python37\lib\site-packages (from requests<3.0.0,>=2.8.1->conan) (3.0.4)
Requirement already satisfied: idna<3,>=2.5 in c:\users\owner\appdata\local\programs\python\python37\lib\site-packages (from requests<3.0.0,>=2.8.1->conan) (2.9)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\owner\appdata\local\programs\python\python37\lib\site-packages (from requests<3.0.0,>=2.8.1->conan) (2020.6.20)
Collecting monotonic>=0.1 (from fasteners>=0.14.1->conan)
Requirement already satisfied: packaging in c:\users\owner\appdata\local\programs\python\python37\lib\site-packages (from deprecation<2.1,>=2.0->conan) (20.3)
Requirement already satisfied: MarkupSafe>=0.23 in c:\users\owner\appdata\local\programs\python\python37\lib\site-packages (from Jinja2<3,>=2.9->conan) (1.1.1)
Requirement already satisfied: pyparsing>=2.0.2 in c:\users\owner\appdata\local\programs\python\python37\lib\site-packages (from packaging->deprecation<2.1,>=2.0->conan) (2.4.6)
Building wheels for collected packages: conan, patch-ng, pluginbase
  Running setup.py bdist_wheel for conan ... done
  Stored in directory: C:\Users\Owner\AppData\Local\pip\Cache\wheels\62\60\d2\9c596f117d0cc085326c2c6844c82fd48e89515bb0738384ef
  Running setup.py bdist_wheel for patch-ng ... done
  Stored in directory: C:\Users\Owner\AppData\Local\pip\Cache\wheels\5a\5a\a0\61661120c9eb9f88e8eb179e81cfadfdb780dda4246d7c7550
  Running setup.py bdist_wheel for pluginbase ... done
  Stored in directory: C:\Users\Owner\AppData\Local\pip\Cache\wheels\7c\dd\41\bf7dfa104973ae48fa5ad6fcaac917a3d9290fdb2922c0ac57
Successfully built conan patch-ng pluginbase
rasa-sdk 2.0.0rc1 requires sanic-cors<0.11.0,>=0.10.0, which is not installed.
rasa-core 0.14.5 requires pydot~=1.4, which is not installed.
rasa-core 0.14.5 requires questionary>=1.0.1, which is not installed.
rasa-core 0.14.5 requires webexteamssdk~=1.0, which is not installed.
python-socketio 3.1.2 requires python-engineio>=3.2.0, which is not installed.
transformers 3.2.0 has requirement sentencepiece!=0.1.92, but you'll have sentencepiece 0.1.92 which is incompatible.
tensorflow 2.1.2 has requirement numpy<1.19.0,>=1.16.0, but you'll have numpy 1.19.2+mkl which is incompatible.
rasa-nlu 0.15.1 has requirement cloudpickle~=0.6.1, but you'll have cloudpickle 1.3.0 which is incompatible.
rasa-nlu 0.15.1 has requirement coloredlogs~=10.0, but you'll have coloredlogs 14.0 which is incompatible.
rasa-nlu 0.15.1 has requirement future~=0.17.1, but you'll have future 0.18.2 which is incompatible.
rasa-nlu 0.15.1 has requirement jsonschema~=2.6, but you'll have jsonschema 3.2.0 which is incompatible.
rasa-nlu 0.15.1 has requirement matplotlib~=2.2, but you'll have matplotlib 3.3.2 which is incompatible.
rasa-nlu 0.15.1 has requirement packaging~=18.0, but you'll have packaging 20.3 which is incompatible.
rasa-nlu 0.15.1 has requirement scikit-learn~=0.20.2, but you'll have scikit-learn 0.23.1 which is incompatible.
rasa-core 0.14.5 has requirement coloredlogs~=10.0, but you'll have coloredlogs 14.0 which is incompatible.
rasa-core 0.14.5 has requirement jsonschema~=2.6, but you'll have jsonschema 3.2.0 which is incompatible.
rasa-core 0.14.5 has requirement packaging~=18.0, but you'll have packaging 20.3 which is incompatible.
rasa-core 0.14.5 has requirement python-telegram-bot~=11.0, but you'll have python-telegram-bot 12.8 which is incompatible.
rasa-core 0.14.5 has requirement pytz~=2018.9, but you'll have pytz 2019.3 which is incompatible.
rasa-core 0.14.5 has requirement scikit-learn~=0.20.0, but you'll have scikit-learn 0.23.1 which is incompatible.
rasa-core 0.14.5 has requirement tensorflow~=1.13.0, but you'll have tensorflow 2.1.2 which is incompatible.
rasa-core-sdk 0.14.0 has requirement coloredlogs~=10.0, but you'll have coloredlogs 14.0 which is incompatible.
dymos 0.15.0 has requirement openmdao>=2.99, but you'll have openmdao 2.9.1 which is incompatible.
bondgraphtools 0.3.9 has requirement matplotlib==2.2.2, but you'll have matplotlib 3.3.2 which is incompatible.
bondgraphtools 0.3.9 has requirement numpy==1.14.5, but you'll have numpy 1.19.2+mkl which is incompatible.
beniget 0.3.0 has requirement gast~=0.4.0, but you'll have gast 0.2.2 which is incompatible.
Installing collected packages: patch-ng, monotonic, fasteners, node-semver, deprecation, bottle, pluginbase, conan
Successfully installed bottle-0.12.19 conan-1.31.3 deprecation-2.0.7 fasteners-0.15 monotonic-1.5 node-semver-0.6.1 patch-ng-1.17.4 pluginbase-1.0.0
You are using pip version 10.0.1, however version 20.3b1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.





C:\Users\Owner\AppData\Local\Programs\Python\Python37\Lib\site-packages\Basilisk>python conanfile.py
Checking conan configuration:
WARN: Migration: Updating settings.yml
WARN: ****************************************
WARN: settings.yml is locally modified, can't be updated
WARN: The new settings.yml has been stored in: C:\SPB_Data\.conan\settings.yml.new
WARN: ****************************************


Running this conan command:
conan install . --build=missing -s build_type=Release -if dist3/conan -o opNav=False -o vizInterface=True
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=Visual Studio
compiler.runtime=MD
compiler.version=15
os=Windows
os_build=Windows
[options]
opNav=False
vizInterface=True
[build_requires]
[env]

Checking conan configuration:


cmake generator set to: Visual Studio 16 2019
WARN: zmq/4.2.5@bincrafters/stable: requirement libsodium/1.0.16@bincrafters/stable overridden by cppzmq/4.3.0@bincrafters/stable to libsodium/1.0.18@bincrafters/stable
protoc_installer/3.5.2@bincrafters/stable: Not found in local cache, looking in remotes...
protoc_installer/3.5.2@bincrafters/stable: Trying with 'conan-center'...
Downloading conanmanifest.txt completed [0.22k]
Downloading conanfile.py completed [2.27k]
Downloading conan_export.tgz completed [0.74k]
Decompressing conan_export.tgz completed [0.00k]
protoc_installer/3.5.2@bincrafters/stable: Downloaded recipe revision 0
conanfile.py (Basilisk/1.8.8b0): Installing package
Requirements
    cppzmq/4.3.0@bincrafters/stable from 'conan-center' - Cache
    eigen/3.3.7@conan/stable from 'conan-center' - Cache
    libsodium/1.0.18@bincrafters/stable from 'conan-center' - Cache
    protobuf/3.5.2@bincrafters/stable from 'conan-center' - Cache
    protoc_installer/3.5.2@bincrafters/stable from 'conan-center' - Downloaded
    zmq/4.2.5@bincrafters/stable from 'conan-center' - Cache
Packages
    cppzmq/4.3.0@bincrafters/stable:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache
    eigen/3.3.7@conan/stable:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache
    libsodium/1.0.18@bincrafters/stable:970e773c5651dc2560f86200a4ea56c23f568ff9 - Cache
    protobuf/3.5.2@bincrafters/stable:970e773c5651dc2560f86200a4ea56c23f568ff9 - Cache
    protoc_installer/3.5.2@bincrafters/stable:456f15897172eef340fcbac8a70811f2beb26a93 - Download
    zmq/4.2.5@bincrafters/stable:7f29b57f2f9bcf6708afe9bc916cc90bd6eb7128 - Cache

Installing (downloading, building) binaries...
protoc_installer/3.5.2@bincrafters/stable: Retrieving package 456f15897172eef340fcbac8a70811f2beb26a93 from remote 'conan-center'
Downloading conanmanifest.txt completed [1.38k]
Downloading conaninfo.txt completed [0.23k]
Downloading conan_package.tgz completed [2071.14k]
Decompressing conan_package.tgz completed [0.00k]
protoc_installer/3.5.2@bincrafters/stable: Package installed 456f15897172eef340fcbac8a70811f2beb26a93
protoc_installer/3.5.2@bincrafters/stable: Downloaded package revision 0
eigen/3.3.7@conan/stable: Already installed!
libsodium/1.0.18@bincrafters/stable: Already installed!
ERROR: Package 'libsodium/1.0.18@bincrafters/stable:970e773c5651dc2560f86200a4ea56c23f568ff9' corrupted. Package folder must exist: C:\.conan\bca27c\1
Try removing the package with 'conan remove'
Running cmake:
conan build . -if dist3/conan
Checking conan configuration:


cmake generator set to: Visual Studio 16 2019
ERROR: conanbuildinfo.txt file not found in C:\Users\Owner\AppData\Local\Programs\Python\Python37\Lib\site-packages\Basilisk\dist3\conan
It is required for this command
You can generate it using 'conan install'

C:\Users\Owner\AppData\Local\Programs\Python\Python37\Lib\site-packages\Basilisk>conan install
usage: conan install [-h] [-g GENERATOR] [-if INSTALL_FOLDER] [-m [MANIFESTS]]
                     [-mi [MANIFESTS_INTERACTIVE]] [-v [VERIFY]]
                     [--no-imports] [-j JSON] [-b [BUILD]] [-r REMOTE] [-u]
                     [-l LOCKFILE] [--lockfile-out LOCKFILE_OUT] [-e ENV_HOST]
                     [-e:b ENV_BUILD] [-e:h ENV_HOST] [-o OPTIONS_HOST]
                     [-o:b OPTIONS_BUILD] [-o:h OPTIONS_HOST]
                     [-pr PROFILE_HOST] [-pr:b PROFILE_BUILD]
                     [-pr:h PROFILE_HOST] [-s SETTINGS_HOST]
                     [-s:b SETTINGS_BUILD] [-s:h SETTINGS_HOST]
                     path_or_reference [reference]
conan install: error: the following arguments are required: path_or_reference
ERROR: Exiting with code: 2

C:\Users\Owner\AppData\Local\Programs\Python\Python37\Lib\site-packages\Basilisk>conan install C:\Users\Owner\AppData\Local\Programs\Python\Python37\Lib\site-packages\Basilisk
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=Visual Studio
compiler.runtime=MD
compiler.version=15
os=Windows
os_build=Windows
[options]
[build_requires]
[env]

Checking conan configuration:


cmake generator set to: Visual Studio 16 2019
WARN: zmq/4.2.5@bincrafters/stable: requirement libsodium/1.0.16@bincrafters/stable overridden by cppzmq/4.3.0@bincrafters/stable to libsodium/1.0.18@bincrafters/stable
conanfile.py (Basilisk/1.8.8b0): Installing package
Requirements
    cppzmq/4.3.0@bincrafters/stable from 'conan-center' - Cache
    eigen/3.3.7@conan/stable from 'conan-center' - Cache
    libsodium/1.0.18@bincrafters/stable from 'conan-center' - Cache
    protobuf/3.5.2@bincrafters/stable from 'conan-center' - Cache
    protoc_installer/3.5.2@bincrafters/stable from 'conan-center' - Cache
    zmq/4.2.5@bincrafters/stable from 'conan-center' - Cache
Packages
    cppzmq/4.3.0@bincrafters/stable:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache
    eigen/3.3.7@conan/stable:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache
    libsodium/1.0.18@bincrafters/stable:970e773c5651dc2560f86200a4ea56c23f568ff9 - Cache
    protobuf/3.5.2@bincrafters/stable:970e773c5651dc2560f86200a4ea56c23f568ff9 - Cache
    protoc_installer/3.5.2@bincrafters/stable:456f15897172eef340fcbac8a70811f2beb26a93 - Cache
    zmq/4.2.5@bincrafters/stable:7f29b57f2f9bcf6708afe9bc916cc90bd6eb7128 - Cache

Installing (downloading, building) binaries...
eigen/3.3.7@conan/stable: Already installed!
libsodium/1.0.18@bincrafters/stable: Already installed!
ERROR: Package 'libsodium/1.0.18@bincrafters/stable:970e773c5651dc2560f86200a4ea56c23f568ff9' corrupted. Package folder must exist: C:\.conan\bca27c\1
Try removing the package with 'conan remove'

C:\Users\Owner\AppData\Local\Programs\Python\Python37\Lib\site-packages\Basilisk>conan --version
Conan version 1.31.3

Andrew Harris

unread,
Nov 23, 2020, 1:27:47 PM11/23/20
to Basilisk Forum
This looks like a Conan specific issue. You can try checking this conan issue (which appears similar). In general, our support for Windows can be hit or miss depending on specific VS versions - I recommend using the Windows Subsystem for Linux (WSL) with VS Code to run/build/play with Basilisk on Windows, which works really well.

Nikhil Jain

unread,
Nov 23, 2020, 10:39:40 PM11/23/20
to Basilisk Forum
I have few suggestion which may fix the problem:
1. Remove .conan folder from user directory as well as C drive.
2. Clone the basilisk directory to lower path. Windows have path limit. Not sure if this may be the issue. I usually create basilisk directly under the drive.
3. Make sure you do not edit default conan configuration files. 

Hanspeter Schaub

unread,
Nov 24, 2020, 9:17:03 AM11/24/20
to Basilisk Forum
To answer the original questions, SpacecraftPlus is not depreciated but a key component of any Basilisk simulation.  Regarding stable baselines, always recommended to pull the tagged releases on the master branch.  On develop you get the bleeding edge.  Read the release notes to see what is new or changed.

Regarding running this, you are doing the plain installed which runs for `Visual Studio 16 2019`.  Is this the compiler you are using?  If not, you need to add a generator flag to the command line `python3 conanfile.py`.  The BSK Setup web pages has more info on setup option flags etc.

Regarding this being a complex set of software, agreed.  You need to understand what python you have installed and are running, there are several python dependencies, need cmake, after running `python conanfile.py` you need to build for Release (not Debug which is often the default in IDEs), etc.

Jian Guo

unread,
Jan 7, 2021, 11:13:45 AM1/7/21
to Basilisk Forum
Hi Alex, have you got this issue solved? I met quite similar issue and got stuck here....

Alex Horvath

unread,
Jan 7, 2021, 11:27:42 AM1/7/21
to Basilisk Forum
I am still having trouble importing _spacecraftplus.pyd, which is a dll file. I think it is an issue with how python handles dll files. In particular, I am using Pycharm and Pycharm does not natively support .pyd files. I think it may work with Anaconda but I am still troubleshooting. What is the specific issue you are having? Maybe I solved it already?

Alex



Hanspeter Schaub

unread,
Jan 8, 2021, 9:22:00 AM1/8/21
to Basilisk Forum
Looking at the console information posted, I wonder if here conan was installed with the binary downloader from the conan web site?  This installs a stand-alone version of conan which has its own python installed.  We had lots of issues with that as the regular checks on what version of software you build Basilisk don't work with this..  It is definitely recommend (see install instructions) to use

pip3 install conan

For example, I'm surprised to see the console talk about running pip version 10 when version 20 is out.  This makes me think you have a conan application installed with its own version of python 3.7, but running a different version of conan on your system.

As pointed out above, this is not trivial software to run and you need to be aware of what version of python, conan, PATH variables etc. that you have, especially on Windows.

Jian Guo

unread,
Jan 8, 2021, 9:38:45 AM1/8/21
to Basilisk Forum
Thanks for your reply. I provide here more details of steps I performed as below:

1. I downloaded the files from : https://bitbucket.org/avslab/basilisk/downloads/ and copied all files into a folder named as basilisk in c:\
2. I followed instructions from "Setup On Windows":
   2.1 I have Cmake (cmake-3.19.2-win64-x64) in C:\Program Files
   2.2 I have Python 3.7.9 in C:\Users\James\AppData\Local\Programs\Python. I chosen python to be added to all path when I installed it.
   2.3 for pip, python version 3.7.9 includes pip already.
   2.4 Visual Studio is with Community 2019
   2.5 For swig, I have swig-4.0.2, and it was added swig.exe directory (C:\Users\James\AppData\swigwin-4.0.2). And I also added Baskilisk directory (C:\basilisk\dist3\Basilisk) to PATH.
   2.6 I did NOT choose optional GitKraken application.
3. I did install conan (ver 1.31.3) by myself with pip comand ( I also tried not to install it since I am not sure whether it would be installed by conanfile.py )
4. I run conanfile.py and I did not see any error. However I saw some warnings (see the attached file).
5. I am not sure how to "Open the Visual Studio project and build the code for Release the default setting for conanfile.py.". I thought it might be done automatically by conanfile.py
6. After running conanfile.py, I saw
   6.1 .conan was added in both C:\ and C:\Users\James.
   6.2 folder dist3 was added. And, there are many .vcsproj and .vcsproj.filters under folder dist3.
7. I tried to run example scenarioBasicOrbit.py. I saw that "ImportError: cannot import name 'spacecraftPlus' from 'Basilisk.simulation' (c:\basilisk\dist3\Basilisk\simulation\__init__.py)".

Meanwhile, I paste what was shown on the command window also in the attached file.

Many thanks for helping me on this issue.
cmd_shown.txt

Nikhil Jain

unread,
Jan 8, 2021, 10:34:01 AM1/8/21
to Basilisk Forum
Could you please confirm if you have done this already:
1. Added <Basilisk-Directory>/dist3/simulation to PATH variable?
2. Build the project either from Visual Studio or using --buildProject argument with python conanfile.py command? 

Hanspeter Schaub

unread,
Jan 11, 2021, 11:31:11 PM1/11/21
to Basilisk Forum
We may found found the issue related to this import error on Windows with `scenarioBasicOrbit.py`. It has to do with SpacecraftPlus being imported before SimulationBaseClass at the top of the scrip.  You can try to reverse the import order and see if that makes this work for you.  We are looking at why this might be happening on Windows and not on UNIX systems.

Jian Guo

unread,
Jan 12, 2021, 8:56:41 AM1/12/21
to Basilisk Forum
Thanks a lot! The issue seems solved by rebuild the project using the  --buildProject argument. I will start to enjoy the tool.

Hanspeter Schaub

unread,
Jan 12, 2021, 9:21:26 AM1/12/21
to Basilisk Forum
This works with the same import order but using the ``--buildProject`` option?  Strange.  We'll look at this some more.  At least we have a computer that is giving us this same error which makes it easier to track down what is going on here.  If the `--buildProject` flag made a difference, I'm guessing that in MS Visual Studio you built for Debug, not for Release.  The support libraries are all built by default for Release as the Intel Eigen library runs much slower in Debug mode.  This means that when the user opens the MS VS or Apple Xcode IDE project, then need to specifically build for Release.  Otherwise there is an incompatibility in the libraries.  The build web page discusses all the flag options.

Glad you got it to work though and thanks for sharing your challenge.

Martin Jacobs

unread,
Apr 4, 2022, 2:51:11 PM4/4/22
to Basilisk Forum

Some time ago I installed BSK on Windows-10 and all went well, running Python 3.8. Everything was up and running in virtually no time.

Recently I changed laptops and re-installed BSK on Windows-11, running Python 3.9. The build seemed to go well and reported success (“The Basilisk build is successful and the scripts are ready to run”), but when running “python scenarioBasicOrbit.py” I get the error:

Traceback (most recent call last):

  File "C:\avslab-basilisk-9345b3cb011c\examples\scenarioBasicOrbit.py", line 217, in <module>

    from Basilisk.simulation import spacecraft

  File "c:\avslab-basilisk-9345b3cb011c\dist3\Basilisk\simulation\spacecraft.py", line 13, in <module>

    from . import _spacecraft

ImportError: DLL load failed while importing _spacecraft: The specified procedure could not be found.


I tried the two fixes suggested above for similar dll error, but no success.

1. I added "c:\avslab-basilisk-9345b3cb011c\dist3\Basilisk\simulation\” to environmental variables.

2. "Build the project either from Visual Studio or using --buildProject argument with python conanfile.py command."   I made a few attempts at this, but clearly misinterpreting. Could you kindly elaborate by detailing the steps? 


My attempts at Point 2 above:

==========================

 

a) The “Basilisk” folder, as downloaded, contains no project file for building, so I am unsure which project to build using Visual Studio from the outset. Instead, I built the project with python conanfile.py

i. Then in VS, open \dist3\ALL_BUILD.vcxproj

ii. Set build to “Release x64”

iii. Build > Rebuild

          => Rebuild All: 173 succeeded, 0 failed, 3 skipped

iv. Then run: python scenarioBasicOrbit.py

          => Same DLL error as above

b) I am also not sure what is meant by “using --buildProject argument with python conanfile.py command”?

i. python conanfile.py --buildProject True => this is the default and makes no difference to the outcome

ii. python conanfile.py --buildProject BUILDPROJECT => this generates the project files in Basilisk, but fail when building \dist3\ALL_BUILD.vcxproj  in VS (details of this follow below)

 

Details of “python conanfile.py --buildProject BUILDPROJECT”:

===================================================

 

a) I deleted both .conan folders and the \dist3 folder and

b) Rebuilt using: “python conanfile.py --buildProject BUILDPROJECT”:

     i. Output as follows:

          Installed c:\avslab-basilisk-9345b3cb011c\dist3

          Processing dependencies for Basilisk==2.1.3b0

          Finished processing dependencies for Basilisk==2.1.3b0

          Finished configuring the Basilisk project.

          Please open project file inside dist3 with Visual Studio 16 2019 IDE and build the project for Release

     ii. I open \dist3\ALL_BUILD.vcxproj

          Popup: The solution already contains an item named “ModuleGenerator” > click OK

     iii. Set build to “Release x64” and build solution in VS

          => fatal error LNK1181: cannot open input file 'architecture\utilities\Release\ModuleIdGenerator.lib'

          Seemingly because the “Release” folder has not yet been created.

 

I am using:

==========


Windows-11

cmake-3.23.0-rc5-windows-x86_64, but also tried

cmake-3.20.5-windows-x86_64 (no difference found)

swigwin-4.0.2

Visual Studio 2019  16.11.11

Python 3.9

 

Hanspeter Schaub

unread,
Apr 4, 2022, 5:20:58 PM4/4/22
to Basilisk Forum
This thread is about importing `SpacecraftPlus`, which is part of the BSK v1.0 version.  In the current BSK v2.0 this module is now called `spacecraft`.  If you installed BSK a "while ago", be sure to read the current install instructions as they have changed a lot since version 1.0.

Martin Jacobs

unread,
Apr 8, 2022, 3:35:08 PM4/8/22
to Basilisk Forum

Thank you for the feedback. I followed the advice, but same end result.

I cloned the latest version from bitbucket as per

   http://hanspeterschaub.info/basilisk/Install/pullCloneBSK.html

and followed latest instructions from here:

   http://hanspeterschaub.info/basilisk/Install/installOnWindows.html

Under the heading: Build Project Process via Command line

All goes well with the build, but running python scenarioBasicOrbit.py => same dll error reported before.

Under the heading: Building with IDE

I run: python conanfile.py --buildProject False

In Visual Studio I open basilisk.sln, set to release and build > build solution => same errors as before:

Error      LNK1181              cannot open input file    'architecture\utilities\Release\ModuleIdGenerator.lib'     vizardLib               C:\Basilisk\dist3\LINK      1

Error      LNK1181              cannot open input file 'architecture\utilities\Release\ModuleIdGenerator.lib'     effectorInterfacesLib               C:\Basilisk\dist3\LINK      1            

Error      LNK1181              cannot open input file 'architecture\utilities\Release\ModuleIdGenerator.lib'     transDeterminationLib               C:\Basilisk\dist3\LINK      1            

… etc

Note: I use Anaconda, but from this form understand your lab does not use Anaconda at all.

Chris Roscoe

unread,
Apr 8, 2022, 4:03:23 PM4/8/22
to Basilisk Forum
Hi Martin,

From what you describe, it sounds like your build is not succeeding, which is why the basic orbit scenario is not running. Do you get the same linker error when you build from the command line vs. in Visual Studio? Also, are you running python conanfile from within a virtual environment as suggested in the build instructions?

I have run the last several minor versions of both v1 and v2 of basilisk on Windows and have debugged several linker errors like this. At the moment, the conanfile from bitbucket works for me without modification (in a python venv). However, I previously had problems trying to build with anaconda and had to uninstall/revert to installing python without anaconda.

Cheers,
Chris Roscoe
Reply all
Reply to author
Forward
0 new messages