British Astronomical Association
Supporting amateur astronomers since 1890

Secondary menu

Main menu

Home Forums Exoplanets
Terms of use

Installing HOPS into an existing Anaconda/py3 environment

11 posts / 0 new
Last post
gordon.b.dennis's picture
Offline
Last seen: 2 weeks 5 days ago
Joined: 12/09/2015 - 07:27
Installing HOPS into an existing Anaconda/py3 environment
gordon.b.dennis's picture
Offline
Last seen: 2 weeks 5 days ago
Joined: 12/09/2015 - 07:27
Installing HOPS into an existing Anaconda/py3 environment

My attempts got almost to the end, but running windows_installer.cmd failed to  install HOPS.
I’ve read ARIEL Space Mission V6.1.pdf Appendix A in detail and I think that installing py3 from scratch via the Anaconda distribution portal as described therein would likely do the trick.  

However, I’m going to tread very carefully around this because at the moment I have a good and stable Anaconda/py3 installation and I obviously don’t want to upset it.  I have several libraries installed (e.g. astropy) and don’t really want to re-install everything if I can possibly avoid doing so.
My conjecture as to a clue to the root of the problem is here in Fig A1.15.

I don’t recall seeing this dialog as it’s about 18 months since I installed py3, but assuming I did see it, I suspect that I would not have checked the first tick box - the warning in red is rather dire.

If I am correct, the question is then: "is there a way of doing this RETROSPECTIVELY over an EXISTING Anaconda installation?"

Obviously, this is the sort of thing where if you input one character out of place, the whole environment could become U/S.

BTW, the problem I have is definitely not concerned with space characters in file names:

C:\Users\gordo\Anaconda3\pkgs\pywin32-223-py37hfa6e2cd_1\Lib\site-packages\pythonwin

Any assistance most gratefully appreciated.

Offline
Last seen: 4 months 4 days ago
Joined: 05/03/2014 - 00:00
Installing HOPS w' existing Anaconda/Python

Gordon.

When you say that the windows_installer failed what were the symptoms, were there any failure messages?

In the HOPS installation notes, Appendix A, there is a description under section 2.0, following figure A.2.2, that describes an optional step to edit the "windows_installer_cmd" file and monitor the installation of the HOPS software in a CMD window.

If you have not tried this then edit the "windows_installer_cmd" file as described and run the installer, any errors encountered during the installation should appear in that window as plain text which may give you a hint to the underlying problem. If necessary you can copy and paste any error messages from that monitor window into a text document for later fault diagnosis.

Other things to watch for are third party anti-virus programs or Windows protection that may be blocking the installer. For the latest builds of Windows 10 you may be limited to only writing the HOPS software to your user documents folder or the desktop, other locations are routinely blocked by Windows protection software.

After HOPS is installed normally it never appears as a program in the Windows applications menu, HOPS is run directly from its desktop shortcut.

William.

gordon.b.dennis's picture
Offline
Last seen: 2 weeks 5 days ago
Joined: 12/09/2015 - 07:27
Installing HOPS into an existing Anaconda/py3 environment

Here's what's going wrong I believe.  After editing the install script per Appendix A, I get this result when I try to run it; plainly, it's a pathname issue, as it cant find the pathname to the python interpreter.

I'm a little cautious about fixing this.
Executing python -c "import sys; print('\n'.join(sys.path))" gives this result:


I don't understand why there are apparently two different python.exe files. Maybe because the machine once had python 2.7 on it?

The full Anaconda result is also shown here:


I think if you could advise me which pathname to specify (and where) that ought to fix this problem..
Many thanks
Gordon

gordon.b.dennis's picture
Offline
Last seen: 2 weeks 5 days ago
Joined: 12/09/2015 - 07:27
Installing HOPS into an existing Anaconda/py3 environment

Sorry,  should have also answered your other point about anti-virus products.  I don't use these and rely on the Win10 firewall.  Hoever, I don't think that's the issue here anyway - it's a pathname problem.

Offline
Last seen: 4 months 4 days ago
Joined: 05/03/2014 - 00:00
Adding a path variable

Gordon.

Try the steps as described here, reboot the computer and then re-run the HOPS installer:

https://geek-university.com/python/add-python-to-the-windows-path/

The linked web page refers to older Windows builds and the screenshots are rather out-of-date but the principle is the same. Double click on the "Paths" entry under "System Variables" and for the latest Windows builds this will open a tabulated list of system variable paths rather than a string as described in the linked web page, double click on the first available empty line in that list and add the path to the Anaconda Python build, in your case this will be C:\Users\gordo\Anaconda3\python

When installing Anaconda with its own Python library it is best practice to uninstall all previous Python versions first, this is particularly troublesome if your previous Python version was downloaded from the Windows App Store as extra steps are required to prevent Windows redirecting any Python calls to the Windows App Store after the old Python version is uninstalled.

The linked web page and the instructions above should hopefully resolve the current issue.

William.

gordon.b.dennis's picture
Offline
Last seen: 2 weeks 5 days ago
Joined: 12/09/2015 - 07:27
Adding a path variable

Hi William

I'm afraid this doesn't work as expected.  I've added the python path to the sytem path environment variable (n.b NOT the user path):

You would now expect 'python' to be iniversally resolved to the python path.  However,these two examples show the  result:

In the first attempt, typing 'python' gives you some speil about the MS app store.

In the second example, where we start from the anaconda3 sub-directory, it behaves as you would expect.

I have not tried to install HOPS again as I think the bahaviour may be strange.

Any ideas plese?

Gordon

Offline
Last seen: 4 months 4 days ago
Joined: 05/03/2014 - 00:00
Modifying System Variables for non-standard HOPS install

Gordon.

Please try the following steps, hopefully this will provide a solution.

Type "sysdm.cpl" (without the quotes) in the Windows desktop search box and select sysdm.cpl, Control Panel Item from the "Best match" menu.

In the System Properties window click the "Advanced" tab and then click the "Environment Variables" button.

In the Environment Variables window double click "Path" under the lower "System variables" heading and delete your previous entry for the path to Python.

Assuming that you installed Anaconda with the option for your use only, and not all system users, and that the default location for the Anaconda installation was used then navigate to the upper panel "User variables for <user name>" double click on "Path" and add the following paths on separate lines:

C:\Users\gordo\Anaconda3

C:\Users\gordo\Anaconda3\Library\mingw-w64\bin

C:\Users\gordo\Anaconda3\Library\usr\bin

C:\Users\gordo\Anaconda3\Library\bin

C:Users\gordo\Anaconda3\Scripts

After adding the paths move all to the top of the tabulated listing by selecting each entry in turn and click the "Move Up" button, the paths listed must be above all other pre-existing environmental paths and in the sequence as described above.

If you used a different location for the Anaconda installation files then modify the above paths accordingly.

Click "OK" to apply the new variables and close out the System Properties window.

Next, re-boot the computer.

After booting the computer go to the programs listing and select from the Anaconda folder "Anaconda Navigator", Launch the Navigator and allow it to fully load, this takes a few minutes the first time it is launched and various blank screens will open and close, finally after the Navigator desktop is fully up wait a few minutes then close it again.

Next, go to the programs listing and select from the Anaconda folder "Anaconda Prompt (Anaconda)" then in the Anaconda Prompt (Anaconda) window at the cursor type "Python" (without quotes) followed by the enter key.

This should return "Python 3.8.5 ~".

If ok type "exit()" (with brackets, without quotes) to exit the Python editor then type "exit" (without brackets, without quotes) to close the Anaconda Prompt (anaconda) window.

If, when querying the Python version as described an error message is displayed "Warning: This Python Interpreter is in a coda environment, but the environment has not been activated~" then while still in the Anaconda Prompt (Anaconda) window type at the cursor (without quotes) "cd c:\" so that the prompt now operates at the root of the c drive, next type (without quotes): "C\Users\gordo\Anaconda3\Scripts\activate base", press enter to run the script, there should be no error message and nothing will appear on screen but the script should execute and activate the Anaconda - Python environment.

Lastly, delete the extracted HOPS folder from wherever you unzipped it and unzip a fresh copy, or download it again if you deleted it, unzip a fresh copy and modify the HOPS  windows-installer file as you did previously by editing in Notepad, adding an extra two blank lines then typing CMD /K in the last line of the installer document and saving the changes so that you can monitor the HOPS installation.

Beyond the above there is not much else I can suggest. I built and installed a virgin Windows 10 Pro build 20H2 VM today, replicated the above steps and installed HOPS successfully after installing Anaconda with the options you used with your computer.  If still having issues you will need to find help from someone with a deeper knowledge of Windows 10 system variables, my experience with earlier versions of Windows is not always directly transferable to the current Windows 10 platform.

William

gordon.b.dennis's picture
Offline
Last seen: 2 weeks 5 days ago
Joined: 12/09/2015 - 07:27
HOPS installation

Good evening William
Unfortunately not successful.

I updated the Anaconda installation to the latest version.

Then carried out the steps you recommended to set the environment variables - checked and double checked.

All as expected. Enironment is activated; no error messages.

  1. Then deleted the folder containing the HOPS installation package
  2. Downloaded the HOPS package again
  3. Tried to run windows_installer.cmd and got this helpful message
  4. Repeated 1-4 three times and gave up

Is there any chance this installer works well on, say Linux, and hasn't been adequately tested on Windows 10 ?

It must be the fraught ever!  Do you have any idea wht's happenning here?

Best regards
Gordon

Offline
Last seen: 4 months 4 days ago
Joined: 05/03/2014 - 00:00
Run the HOPS installer from the downloads folder

Gordon.

Did you unzip the HOPS software before trying to open it...?

If you did unzip the download then using a regular web browser (Edge, Chrome, Firefox etc) it should download the zipped HOPS installer to your user downloads folder on the C:\ drive, unzip the HOPS installer in that user downloads folder location, do not choose the root of a different drive as shown in your screen shot.

Try downloading the HOPS software again to your regular downloads folder, unzip the package in the downloads folder and run the windows_installer_cmd from that location.

Any different?

AFAIK there are no reported problems with the installer on Windows 10, I have installed HOPS on both real and virtual Windows 10 platforms without any issues.

If still unsuccessful contact me using the private message service off-forum and maybe we can set up a remote AnyDesk session.

William.

gordon.b.dennis's picture
Offline
Last seen: 2 weeks 5 days ago
Joined: 12/09/2015 - 07:27
Run the HOPS installer from the downloads folder

Good afternoon William
Yes, I did unzip the HOPS folder before running.
This time, I did the following:

  1. Deleted previous HOPS folder
  2. Cleared everything from the downloads folder
  3. Downloaded HOPS again
  4. Unzipped the downloaded folder into the downloads folder
  5. Double-clicked on windows-install.cmd and .. When you try to install, you get the same message

The other interesting thing is that python behaves differently in different environments - don't know if that provides clues?
First from the Anaconda prompt:

Now from the Windows command prompt:

You get that result if you issue 'python' from any drive or folder.

Something definitely AWOL here

Best regards
Gordon