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

install_python installs conda but not python on Windows #505

Open
Raul-Ciria-Aylagas opened this issue Feb 6, 2025 · 2 comments · Fixed by #506
Open

install_python installs conda but not python on Windows #505

Raul-Ciria-Aylagas opened this issue Feb 6, 2025 · 2 comments · Fixed by #506
Assignees
Labels
bug Something isn't working

Comments

@Raul-Ciria-Aylagas
Copy link

Expected behavior

It is expected that the install python command installs first python and urbanopt dependencies.

Actual behavior

The command downloads the miniconda distribution correctly, but does not manage to install python in the folder, therefore when it tries to install the python libraries, it fails because doesn't find the python.exe.

To Reproduce

Steps to reproduce the behavior:

  1. Follow the instructions for manual installation on Windows from https://docs.urbanopt.net/installation/windows.html
  2. When uo command is ready and usable, try to install python deps with uo install_python
  3. You will find an error like this one:
Checking system.....
Python paths have not yet been initialized with URBANopt.
Installing Python 3.10...
Installing ThermalNetwork 0.3.3
C:/Users/rciria/Ruby32/lib/ruby/3.2.0/open3.rb:222:in `spawn': No such file or directory - C:/Users/rciria/Ruby32/lib/ruby/gems/3.2.0/gems/urbanopt-cli-1.0.1/example_files/python_deps/python-3.10/Scripts/pip.exe install ThermalNetwork==0.3.3 (Errno::ENOENT)
        from C:/Users/rciria/Ruby32/lib/ruby/3.2.0/open3.rb:222:in `popen_run'
        from C:/Users/rciria/Ruby32/lib/ruby/3.2.0/open3.rb:103:in `popen3'
        from C:/Users/rciria/Ruby32/lib/ruby/3.2.0/open3.rb:290:in `capture3'
        from C:/Users/rciria/Ruby32/lib/ruby/gems/3.2.0/gems/urbanopt-cli-1.0.1/lib/uo_cli.rb:1156:in `block in install_python_dependencies'
        from C:/Users/rciria/Ruby32/lib/ruby/gems/3.2.0/gems/urbanopt-cli-1.0.1/lib/uo_cli.rb:1144:in `each'
        from C:/Users/rciria/Ruby32/lib/ruby/gems/3.2.0/gems/urbanopt-cli-1.0.1/lib/uo_cli.rb:1144:in `install_python_dependencies'
        from C:/Users/rciria/Ruby32/lib/ruby/gems/3.2.0/gems/urbanopt-cli-1.0.1/lib/uo_cli.rb:1256:in `<module:CLI>'
        from C:/Users/rciria/Ruby32/lib/ruby/gems/3.2.0/gems/urbanopt-cli-1.0.1/lib/uo_cli.rb:23:in `<module:URBANopt>'
        from C:/Users/rciria/Ruby32/lib/ruby/gems/3.2.0/gems/urbanopt-cli-1.0.1/lib/uo_cli.rb:22:in `<top (required)>'
        from <internal:C:/Users/rciria/Ruby32/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from <internal:C:/Users/rciria/Ruby32/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from C:/Users/rciria/Ruby32/lib/ruby/gems/3.2.0/gems/urbanopt-cli-1.0.1/bin/uo:3:in `<top (required)>'
        from C:/Users/rciria/Ruby32/bin/uo:32:in `load'
        from C:/Users/rciria/Ruby32/bin/uo:32:in `<main>'
  1. If you go to the folder ./example_files/python_deps/python-3.10/ you will find a conda installation but no Scripts folder, so no python installation can be found.

Version

URBANopt: 1.0.1

@Raul-Ciria-Aylagas Raul-Ciria-Aylagas added the bug Something isn't working label Feb 6, 2025
@vtnate vtnate self-assigned this Feb 21, 2025
@vtnate vtnate linked a pull request Feb 21, 2025 that will close this issue
@xixihaha1995
Copy link

In case of anyone still come across errors

#correct mannually install
https://www.python.org/ftp/python/3.10.0/python-3.10.0-amd64.exe
#into
C:\URBANopt-cli-1.0.1\gems\ruby\3.2.0\gems\urbanopt-cli-1.0.1\example_files\python_deps

#Then powershell run:
C:/URBANopt-cli-1.0.1/gems/ruby/3.2.0/gems/urbanopt-cli-1.0.1/example_files/python_deps/python-3.10/python.exe -m pip install ThermalNetwork==0.3.3 urbanopt-ditto-reader==0.6.4 NREL-disco==0.5.1 geojson-modelica-translator==0.9.2

@vtnate vtnate reopened this Feb 24, 2025
@vtnate
Copy link
Collaborator

vtnate commented Feb 24, 2025

We found another problem with the installer. We're working on it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants