error C2248 when run python setup.py install
See original GitHub issueHi, I’m facing an issue with building the simulator in Windows 10. After cloning the git repo, I installed Python dependencies with conda as instructed:
conda env create -f environment.yml
Then I ran the following command to build the simulator:
python setup.py install
and end up with this error:
subprocess.CalledProcessError: Command ‘[‘cmake’, ‘–build’, ‘.’, ‘–config’, ‘Release’, ‘–’, ‘/m’]’ returned non-zero exit status 1.
I scrolled up a bit and see the following lines in red:
PythonBindings.cpp
Robot.cpp
C:\MyPath\evogym\evogym\simulator\SimulatorCPP\Environment.cpp(271,3): error C2248: 'Eigen::Ref<Eigen::MatrixXd,0,Eigen::OuterStride<-1>>::Ref': cannot access private member declared
in class 'Eigen::Ref<Eigen::MatrixXd,0,Eigen::OuterStride<-1>>' [C:\MyPath\evogym\build\temp.win-amd64-3.7\Release\SimulatorCPP\simulator_cpp.vcxproj]
C:\MyPath\evogym\evogym\simulator\externals\eigen\Eigen\src/Core/Ref.h(299): message : see declaration of 'Eigen::Ref<Eigen::MatrixXd,0,Eigen::OuterStride<-1>>::Ref' [C:\MyPath\evogym\build\temp.win-amd64-3.7\Release\SimulatorCPP\simulator_cpp.vcxproj]
C:\MyPath\evogym\evogym\simulator\SimulatorCPP\Environment.h(95): message : see declaration of 'Eigen::Ref<Eigen::MatrixXd,0,Eigen::OuterStride<-1>>' [C:\MyPath\evogym\build\temp.win-amd64-3.7\Release\SimulatorCPP\simulator_cpp.vcxproj]
C:\MyPath\evogym\evogym\simulator\SimulatorCPP\Environment.cpp(282,3): error C2248: 'Eigen::Ref<Eigen::MatrixXd,0,Eigen::OuterStride<-1>>::Ref': cannot access private member declared
in class 'Eigen::Ref<Eigen::MatrixXd,0,Eigen::OuterStride<-1>>' [C:\MyPath\evogym\build\temp.win-amd64-3.7\Release\SimulatorCPP\simulator_cpp.vcxproj]
C:\MyPath\evogym\evogym\simulator\externals\eigen\Eigen\src/Core/Ref.h(299): message : see declaration of 'Eigen::Ref<Eigen::MatrixXd,0,Eigen::OuterStride<-1>>::Ref' [C:\MyPath\evogym\build\temp.win-amd64-3.7\Release\SimulatorCPP\simulator_cpp.vcxproj]
C:\MyPath\evogym\evogym\simulator\SimulatorCPP\Environment.h(95): message : see declaration of 'Eigen::Ref<Eigen::MatrixXd,0,Eigen::OuterStride<-1>>' [C:\MyPath\evogym\build\temp.win-amd64-3.7\Release\SimulatorCPP\simulator_cpp.vcxproj]
C:\MyPath\evogym\evogym\simulator\SimulatorCPP\Environment.cpp(294,3): error C2248: 'Eigen::Ref<Eigen::MatrixXd,0,Eigen::OuterStride<-1>>::Ref': cannot access private member declared
in class 'Eigen::Ref<Eigen::MatrixXd,0,Eigen::OuterStride<-1>>' [C:\MyPath\evogym\build\temp.win-amd64-3.7\Release\SimulatorCPP\simulator_cpp.vcxproj]
C:\MyPath\evogym\evogym\simulator\externals\eigen\Eigen\src/Core/Ref.h(299): message : see declaration of 'Eigen::Ref<Eigen::MatrixXd,0,Eigen::OuterStride<-1>>::Ref' [C:\MyPath\evogym\build\temp.win-amd64-3.7\Release\SimulatorCPP\simulator_cpp.vcxproj]
C:\MyPath\evogym\evogym\simulator\SimulatorCPP\Environment.h(95): message : see declaration of 'Eigen::Ref<Eigen::MatrixXd,0,Eigen::OuterStride<-1>>' [C:\MyPath\evogym\build\temp.win-amd64-3.7\Release\SimulatorCPP\simulator_cpp.vcxproj]
Sim.cpp
C:\MyPath\evogym\evogym\simulator\SimulatorCPP\Environment.cpp(309,3): error C2248: 'Eigen::Ref<Eigen::MatrixXd,0,Eigen::OuterStride<-1>>::Ref': cannot access private member declared
in class 'Eigen::Ref<Eigen::MatrixXd,0,Eigen::OuterStride<-1>>' [C:\MyPath\evogym\build\temp.win-amd64-3.7\Release\SimulatorCPP\simulator_cpp.vcxproj]
C:\MyPath\evogym\evogym\simulator\externals\eigen\Eigen\src/Core/Ref.h(299): message : see declaration of 'Eigen::Ref<Eigen::MatrixXd,0,Eigen::OuterStride<-1>>::Ref' [C:\MyPath\evogym\build\temp.win-amd64-3.7\Release\SimulatorCPP\simulator_cpp.vcxproj]
C:\MyPath\evogym\evogym\simulator\SimulatorCPP\Environment.h(95): message : see declaration of 'Eigen::Ref<Eigen::MatrixXd,0,Eigen::OuterStride<-1>>' [C:\MyPath\evogym\build\temp.win-amd64-3.7\Release\SimulatorCPP\simulator_cpp.vcxproj]
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Error while installing python module from github and through ...
Now back in your command prompt, run python as such: (py_venv) C:\Users\kyrlon\Documents\obspy_example> py demo_obspy.py.
Read more >Python setup.py Help · Issue #716 · htm-community/htm.core
I've installed VS 2019, got C:\Program Files (x86)\Microsoft Visual Studio\Installer in PATH, and I can run c++ --help in command prompt. What ...
Read more >Installing Python Modules (Legacy version) — Python 3.11.1 ...
Running setup.py install builds and installs all modules in one run. If you prefer to work incrementally—especially useful if you want to customize...
Read more >python setup.py egg_info did not run successfully. - You.com ...
However, when I try to install pygame, I get the error "subprocess-exited-with-error" and at the end it states "Microsoft Visual C++ 14.2 or...
Read more >Write C++ extensions for Python - Visual Studio (Windows)
Alternatively, with the Python native development tools installed in Visual Studio, you can start with the Python Extension Module template.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you for your quick reply! I was using the version 2019 of VS build tools. After changing VS build tools to 2017 version and deleting the caches in the build folder, I can now install the simulator and run gym_test.py.
Sorry I take that back, it seems like you can run cmake from the terminal. Another potential issue: are you using the 2017 version of Visual Studio Build Tools? The 2019 version in particular is currently not supported.