el323
el323

Reputation: 2920

Anaconda Python installation error

I get the following error during Python 2.7 64-bit windows installation. I previously installed python 3.5 64-bit and it worked fine. But during python 2.7 installation i get this error:

Traceback (most recent call last):
File "C:\Anaconda2\Lib\_nsis.py", line 164, in <module> main()
File "C:\Anaconda2\Lib\_nsis.py", line 150, in main
  mk_menus(remove=False)
File "C:\Anaconda2\Lib\_nsis.py", line 94, in mk_menus
  err("Traceback:\n%s\n" % traceback.format_exc(20))
IOError: [Errno 9] Bad file descriptor

Kindly help me out.

Upvotes: 18

Views: 24123

Answers (4)

Muhammad Rashid
Muhammad Rashid

Reputation: 11

You need to install anaconda again but before follow the following steps:

Step 1: Before uninstalling Anaconda use this command

anaconda-clean --yes

Step 2: Delete all files e.g .conda .anaconda etc

Step 3: Uninstall Anaconda

step 4: Restart computer

Step 5: Install it again

Upvotes: 0

Larry
Larry

Reputation: 1

I received a different error but was able to overcome it by adding the following paths to the environment variables:

  • C:\Users\myusername\Anaconda\envs\Tableau-Python-Server
  • C:\Users\myusername\Anaconda\envs\Tableau-Python-Server\Scripts

There are several YouTube videos on environment variables and how to change them but for me this worked:

  1. Right click on this-pc in explorer
  2. Select properties from the menu (bottom of the list for me)
  3. Select advanced system settings (fourth from top on left hand side of window for me)
  4. Press the environment variables button on the bottom right of the dialog box
  5. Highlight the "Path" system variable in the bottom window of the new dialog box
  6. Click edit
  7. Scroll to the bottom of the list
  8. Click the New button on the right hand side of this dialog box
  9. Enter the first path and click Ok
  10. Click New again, enter the second path and click Ok
  11. Cancel out of all dialogs and close all windows (maybe go check to be sure it was saved as you expected)

Reboot then do the steps stated by Steve above (thank you Steve!)

Return to the install install directory I originally unzipped TabPy install into and run the setup.bat file again

This started the localhost server and I was able to connect through Tableau following the instructions (help menu, settings and performance, manage external service connection, local host and port 9004)

After connecting I re-read the instructions and logs and saw that pip could be updated so I did that command as stated in the log, run cmd as admin if not already logged in as admin cd to C:\Users\myusername\Anaconda\envs\Tableau-Python-Server enter ..\python -m pip install --upgrade pip

All good.

Seems to leave some windows registry cleanup items but a registry cleaner will solve that no worries.

As always, good idea to restore point before and after installs. Or full backup.

Upvotes: 0

user5425156
user5425156

Reputation: 397

It may be caused by file writing privilege. Or, you can only install it for the local/current user instead of all users.

Upvotes: 6

SteveY
SteveY

Reputation: 496

I had the same problem today. I did the following to get this fixed:

First, open a DOS prompt and admin rights. Then, go to your Anaconda2\Scripts folder. Then, type in:

conda update conda

and allow all updates. One of the updates should be menuinst.

Then, change to the Anaconda2\Lib directory, and type in the following command:

..\python _nsis.py mkmenus

Wait for this to complete, then check your Start menu for the new shortcuts.

Steve

Upvotes: 48

Related Questions