I installed Anaconda 64 python 2.7 on Windows 7 64-bit version. After installation, the anaconda prompt can start with no problem. But whenever I restart/shutdown and restart the laptop, the anaconda prompt will display the following error message, and some python packages have problems to load in the jupyter notebook.
Deactivating environment "C:\Users\user\Anaconda2"...
Activating environment "C:\Users\user\Anaconda2"...
The input line is too long.
"PATH_NO_SCRIPTS=C:\Users\user\Anaconda2;;C:\Users\user\Anaconda2\Lib
rary\bin;C:\Python27\;C:\Python27\Scripts;c:\Rtools\bin;c:\Rtools\gcc-4.6.3\bin;
C:\ProgramData\Oracle\Java\javapath;%COSMOSM%;C:\Program Files\Lenovo Fingerprin
t Reader\;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS
Client\;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP
\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program File
s (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Intel\Intel(R) Man
agement Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine
Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Component
s\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\
Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon
\;C:\Program Files\Sony\VAIO Improvement\;C:\Program Files (x86)\Sony\VAIO Start
up Setting Tool;c:\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;
c:\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;c:\Program Files
(x86)\Common Files\Roxio Shared\OEM\12.0\DLLShared\;c:\Program Files (x86)\Roxi
o 2010\OEM\AudioCore\;C:\Program Files (x86)\Common Files\Thunder Network\KanKan
\Codecs;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\IVI Foundat
ion\VISA\Win64\Bin\;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin\;C:\Pro
gram Files (x86)\IVI Foundation\VISA\WinNT\Bin;C:\Program Files (x86)\IVI Founda
tion\IVI\bin;C:\Program Files\IVI Foundation\IVI\bin;C:\PROGRA~2\IVIFOU~1\VISA\W
inNT\Bin;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Python27;C:\Users\user\AppData\Local\Smartbar\Application\;C:\Program Files (x86)\WinSCP\;C:\Python
27\Scripts;C:\Program Files\ffmpeg\bin;C:\Program Files\Microsoft SQL Server\110
\Tools\Binn\;C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\;C:\Program Files (x86
)\Windows Kits\8.1\Windows Performance Toolkit\;C:\HashiCorp\Vagrant\bin;C:\Prog
ram Files (x86)\Skype\Phone\;;C:\Users\user\Desktop\win64\\lib;C:\Users\user\Desktop\win64\\3rdparty\cudnn\bin;C:\Users\user\Desktop\win64\\3rdpa
rty\cudart;C:\Users\user\Desktop\win64\\3rdparty\vc;C:\Users\user\Desk
top\win64\\3rdparty\openblas\bin;C:\Python27\;C:\Python27\Scripts;c:\Rtools\bin;
c:\Rtools\gcc-4.6.3\bin;C:\ProgramData\Oracle\Java\javapath;%COSMOSM%;C:\Program
Files\Lenovo Fingerprint Reader\;C:\Program Files (x86)\Intel\iCLS Client\;C:\P
rogram Files\Intel\iCLS Client\;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Pro
gram Files (x86)\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\Syste
m32\Wbem;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program
Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Int
el(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Man
agement Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management E
ngine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Fi
les\Intel\WirelessCommon\;C:\Program Files\Sony\VAIO Improvement\;C:\Program Fil
es (x86)\Sony\VAIO Startup Setting Tool" was unexpected at this time.
I tried to follow the solutions here and here, but with no success.
I looked into the Script folder under Anaconda, and found the error message might come from the activate.bat file. But I have no clue what to do next.
@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
REM Check for CONDA_ENVS_PATH environment variable
REM It it doesn't exist, look inside the Anaconda install tree
IF "%CONDA_ENVS_PATH%" == "" (
REM turn relative path into absolute path
CALL :NORMALIZEPATH CONDA_ENVS_PATH "%~dp0..\envs"
)
REM Used for deactivate, to make sure we restore original state after deactivation
IF "%CONDA_PATH_BACKUP%" == "" (SET "CONDA_PATH_BACKUP=%PATH%")
set "CONDA_NEW_NAME=%~1"
IF "%~2" == "" GOTO skiptoomanyargs
ECHO ERROR: Too many arguments provided
GOTO usage
:skiptoomanyargs
IF "%CONDA_NEW_NAME%" == "" set "CONDA_NEW_NAME=%~dp0.."
REM Search through paths in CONDA_ENVS_PATH
REM First match will be the one used
FOR %%F IN ("%CONDA_ENVS_PATH:;=" "%") DO (
IF EXIST "%%~F\%CONDA_NEW_NAME%\conda-meta" (
SET "CONDA_NEW_PATH=%%~F\%CONDA_NEW_NAME%"
GOTO found_env
)
)
IF EXIST "%CONDA_NEW_NAME%\conda-meta" (
SET "CONDA_NEW_PATH=%CONDA_NEW_NAME%"
) ELSE (
ECHO No environment named "%CONDA_NEW_NAME%" exists in %CONDA_ENVS_PATH%, or is not a valid conda installation directory.
EXIT /b 1
)
:found_env
SET "SCRIPT_PATH=%~dp0"
IF "%SCRIPT_PATH:~-1%"=="\" SET "SCRIPT_PATH=%SCRIPT_PATH:~0,-1%"
REM Set CONDA_NEW_NAME to the last folder name in its path
FOR /F "tokens=* delims=\" %%i IN ("%CONDA_NEW_PATH%") DO SET "CONDA_NEW_NAME=%%~ni"
REM special case for root env:
REM Checks for Library\bin on PATH. If exists, we have root env on PATH.
call :NORMALIZEPATH ROOT_PATH "%~dp0.."
CALL SET "PATH_NO_ROOT=%%PATH:%ROOT_PATH%;=%%"
IF NOT "%PATH_NO_ROOT%"=="%PATH%" SET "CONDA_DEFAULT_ENV=%ROOT_PATH%"
REM Deactivate a previous activation if it is live
IF "%CONDA_DEFAULT_ENV%" == "" GOTO skipdeactivate
REM This search/replace removes the previous env from the path
ECHO Deactivating environment "%CONDA_DEFAULT_ENV%"...
REM Run any deactivate scripts
IF NOT EXIST "%CONDA_DEFAULT_ENV%\etc\conda\deactivate.d" GOTO nodeactivate
PUSHD "%CONDA_DEFAULT_ENV%\etc\conda\deactivate.d"
FOR %%g IN (*.bat) DO CALL "%%g"
POPD
:nodeactivate
REM Remove env name from PROMPT
FOR /F "tokens=* delims=\" %%i IN ("%CONDA_DEFAULT_ENV%") DO SET "CONDA_OLD_ENV_NAME=%%~ni"
call set PROMPT=%%PROMPT:[%CONDA_OLD_ENV_NAME%] =%%
SET "CONDACTIVATE_PATH=%CONDA_DEFAULT_ENV%;%CONDA_DEFAULT_ENV%\Scripts;%CONDA_DEFAULT_ENV%\Library\bin"
CALL SET "PATH=%%PATH:%CONDACTIVATE_PATH%=%%"
SET CONDA_DEFAULT_ENV=
:skipdeactivate
CALL :NORMALIZEPATH CONDA_DEFAULT_ENV "%CONDA_NEW_PATH%"
ECHO Activating environment "%CONDA_DEFAULT_ENV%"...
SET "PATH=%CONDA_DEFAULT_ENV%;%CONDA_DEFAULT_ENV%\Scripts;%CONDA_DEFAULT_ENV%\Library\bin;%PATH%"
IF "%CONDA_NEW_NAME%"=="" (
REM Clear CONDA_DEFAULT_ENV so that this is truly a "root" environment, not an environment pointed at root
SET CONDA_DEFAULT_ENV=
) ELSE (
SET "PROMPT=[%CONDA_NEW_NAME%] %PROMPT%"
)
REM Make sure that root's Scripts dir is on PATH, for sake of keeping activate/deactivate available.
CALL SET "PATH_NO_SCRIPTS=%%PATH:%SCRIPT_PATH%=%%"
IF "%PATH_NO_SCRIPTS%"=="%PATH%" SET "PATH=%PATH%;%SCRIPT_PATH%"
REM Run any activate scripts
IF NOT EXIST "%CONDA_DEFAULT_ENV%\etc\conda\activate.d" GOTO noactivate
PUSHD "%CONDA_DEFAULT_ENV%\etc\conda\activate.d"
FOR %%g IN (*.bat) DO CALL "%%g"
POPD
:noactivate
REM Trim trailing semicolon, if any
IF "%PATH:~-1%"==";" SET "PATH=%PATH:~0,-1%"
REM Clean up any double colons we may have ended up with
SET "PATH=%PATH:;;=;%"
ENDLOCAL & (
SET "PATH=%PATH%"
SET "PROMPT=%PROMPT%"
SET "CONDA_DEFAULT_ENV=%CONDA_DEFAULT_ENV%"
SET "CONDA_PATH_BACKUP=%CONDA_PATH_BACKUP%"
)
EXIT /B
:NORMALIZEPATH
SET "%1=%~dpfn2"
EXIT /B
Any hint is appreciated.
CALL SET "PATH_NO_SCRIPTS=%%PATH:%SCRIPT_PATH%=%%"
– Haemato