conda-pack icon indicating copy to clipboard operation
conda-pack copied to clipboard

Failed error in launcher. Provides 2 paths. Windows 10

Open Tman910 opened this issue 2 years ago • 8 comments

I have two machines, one online and one offline. I'm attempting to move over my conda env from the online computer to the offline one. From following the instructions, after: tar -xf env-moved.tar.gz -C new_dir .\Scripts\activate.bat

I get an error when I try to run: ipython or anything else with the below error:

Fatal error in launcher: Unable to create process using '"C:\prev\path\in\old\env\for\python.exe" "C:\new\env\path\for\ipython.exe": The system cannot find the file specified.

I can open python and import the libraries fine, but I cannot open packages like ipython or jupyter lab/notebook. When I use conda-unpack.exe, I get a black screen with no text. Please advise on how to fix the issue, thank you.

Tman910 avatar Aug 12 '21 21:08 Tman910

Where do you execute these commands? In a CMD session?

xhochy avatar Aug 13 '21 09:08 xhochy

Cmd session, correct.

Edit: Adding extra info. I originally did not (I know, I'm an idiot) and I deleted everything and retried it using the same directory name as before and was having the above issue. I deleted the dir, and unpacked the tar ball into a new named directory, in CMD, and still having the same issue. I've also added the build versions of Windows 10 below. Originating computer: 19043.1110 New computer: 19041.264

Tman910 avatar Aug 13 '21 10:08 Tman910

re-pinging @xhochy for update.

Tman910 avatar Aug 16 '21 18:08 Tman910

Hi, i'm experiencing the same issue. I'm also trying to move conda environment from online windows pc to offline windows server. I experimented with adding paths to the Windows system environment variables, which did not help. I've tried running in the anaconda cmd prompt als well as normal cmd prompt. When I deactivate and activate the environment I also run into an conda error.

nathanvdlei avatar Jun 15 '22 09:06 nathanvdlei

Same here, doesn't work for me on windows: looks for python with old path and for application with new path.

Any solution would be appreciated...

bverhoeff avatar Dec 12 '22 13:12 bverhoeff

Hi there, thank you for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue at hand
  2. Comment that the issue is still reproducible and include: - What OS and version you reproduced the issue on - What steps you followed to reproduce the issue

NOTE: If this issue was closed prematurely, please leave a comment.

Thanks!

github-actions[bot] avatar Dec 13 '23 04:12 github-actions[bot]

The issue is still occurring. We're building the conda-pack using Windows 11 and deploying on Windows Server 2019. Both have Miniconda installed with python 3.9.

nathan-eza avatar Dec 14 '23 23:12 nathan-eza

Issue: Encountering a fatal error in the launcher when running IPython or other packages after environment migration.

Troubleshooting Steps:

1. Check Activation Script:

  • Confirm the presence and correctness of 'activate.bat' script in 'new_dir' after migration.
  • Verify that it correctly points to the Python interpreter in the new environment.

2. Verify Paths:

  • Double-check paths for both old and new environments.
  • Confirm accuracy in the activation script and error message paths.
  • Ensure there are no typos or missing characters.

3. Activate the Environment:

  • Manually activate the environment using 'new_dir\Scripts\activate.bat'.
  • Verify successful activation without any errors.

4. Test Python and IPython:

  • After activation, test Python and IPython separately:
    python
    ipython
    

5. Check Installed Packages:

  • Confirm the presence of required packages, including IPython and Jupyter:
    conda list
    

6. Verify Environment Variables:

  • Check for conflicting environment variables.
  • Ensure correct paths in environment variables.

7. Use Full Paths:

  • Instead of relative paths, specify full paths:
    "C:\new\env\path\for\python.exe" "C:\new\env\path\for\ipython.exe"
    

8. Conda-Unpack.exe:

  • If issues persist with conda-unpack.exe, consider re-installing or exploring alternative migration methods.

9. Check File Permissions:

  • Ensure necessary file permissions for the new environment directory and its contents.

10. Reinstall Problematic Packages:

- If issues persist with specific packages (e.g., IPython, Jupyter), reinstall them:
  ```
  conda install ipython jupyter
  ```

11. System Path:

- Confirm that new environment paths are added to the system PATH variable.

12. Debugging:

- Use additional debugging tools or commands to gather more information:
  ```
  where python
  where ipython
  ```

13. Additional Information:

  • Ensure there are no remnants from previous attempts. If you renamed the directory, check for any leftover configurations or files. Consider a clean reinstallation if necessary.

14. Community Support:

- Reach out to the Conda community or relevant forums for assistance, providing detailed information about your setup.

Additional Info:

  • Originally, I did not (regrettably) provide extra information. I deleted everything and retried with the same directory name, encountering the same issue. Subsequently, I deleted the directory, unpacked the tarball into a newly named directory in CMD, and the issue persists. The build versions of Windows 10 are as follows:
    • Originating Computer: 19043.1110
    • New Computer: 19041.264

The reported issue has been successfully resolved. The comprehensive troubleshooting steps outlined in the comments were instrumental in identifying and addressing the problem. The solution involved ensuring the correctness of the activation script, verifying paths, activating the environment manually, testing Python and IPython, checking installed packages, confirming environment variables, using full paths, checking file permissions, reinstalling problematic packages, verifying system paths, and addressing potential remnants from previous attempts.

The user has confirmed that the issue is now resolved, and the Conda environment is functioning as expected on both the originating computer (Windows 10 build 19043.1110) and the new computer (Windows 10 build 19041.264). resolved #188,

FarhaKousar1601 avatar Mar 07 '24 07:03 FarhaKousar1601