Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

icub-main Python bindings do not work on Windows #1100

Closed
traversaro opened this issue Apr 21, 2022 · 4 comments
Closed

icub-main Python bindings do not work on Windows #1100

traversaro opened this issue Apr 21, 2022 · 4 comments

Comments

@traversaro
Copy link
Member

2022-04-19T02:33:58.6045591Z   -- Installing: C:/Miniconda/envs/test/conda-bld/icub-main_1650334923373/_h_env/Library/Lib/site-packages/icub.py
2022-04-19T02:33:58.6046181Z   -- Installing: C:/Miniconda/envs/test/conda-bld/icub-main_1650334923373/_h_env/Library/Lib/site-packages/_icub.pyd

It should be:

2022-04-19T02:33:58.6045591Z   -- Installing: C:/Miniconda/envs/test/conda-bld/icub-main_1650334923373/_h_env/Lib/site-packages/icub.py
2022-04-19T02:33:58.6046181Z   -- Installing: C:/Miniconda/envs/test/conda-bld/icub-main_1650334923373/_h_env/Lib/site-packages/_icub.pyd
@traversaro
Copy link
Member Author

#1072 was not complete.

@traversaro
Copy link
Member Author

On Linux, this works fine:

traversaro@IITICUBLAP257:~$ mamba create -n icub-main -c conda-forge -c robotology icub-main
traversaro@IITICUBLAP257:~$ mamba activate icub-main
(icub-main) traversaro@IITICUBLAP257:~$ mamba list | grep icub-main
# packages in environment at /home/traversaro/mambaforge/envs/icub-main:
icub-main                 1.24.1          py39he6d5064_49    robotology
(icub-main) traversaro@IITICUBLAP257:~$ python
Python 3.9.12 | packaged by conda-forge | (main, Mar 24 2022, 23:22:55)
[GCC 10.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import icub
>>>

On Windows, even by setting as a workaround PYTHONPATH and PATH the bindings do not work, I guess due to some visibility issues? :

C:\Users\STraversaro>mamba create -n icub-main -c conda-forge -c robotology icub-main
C:\Users\STraversaro>mamba activate icub-main
(icub-main) C:\Users\STraversaro>set PYTHONPATH=%CONDA_PREFIX%\Library\Lib\site-packages\
(icub-main) C:\Users\STraversaro>set PATH=%PATH%;%CONDA_PREFIX%\Library\Lib\site-packages\
(icub-main) C:\Users\STraversaro>python
Python 3.9.12 | packaged by conda-forge | (main, Mar 24 2022, 23:17:03) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import icub
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\STraversaro\AppData\Local\mambaforge\envs\icub-main\Library\Lib\site-packages\icub.py", line 15, in <module>
    import _icub
ImportError: DLL load failed while importing _icub: The specified module could not be found

@Nicogene

@traversaro traversaro changed the title icub-main conda packages on Windows install Python bindings in the wrong location icub-main Python bindings do not work on Windows Apr 21, 2022
@traversaro
Copy link
Member Author

The initial problem is due to the fact that when creating conda packages on Windows we do not specify the correct directory, as we do for example in:

@traversaro
Copy link
Member Author

This was fixed by robotology/icub-main#985 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant