4

I had Anaconda installed before, but it wasn't responding (Python & VS Code acts weird) so i decided to remove and install again.

After that I installed and created an environment again. Command prompt recognizes conda/anaconda commands but when I try to activate environment it just leaves an error message "Access denied". Also VS Code cannot activate any environment. But can run Python scripts without it.

Used commands:

>>conda create -n tensorflow1 pip python=3.5

>>activate tensorflow1 conda activate tensorflow1

Error messages:

>>C:\tensorflow1\models\research\object_detection>activate tensorflow1
>>>Erişim engellendi.

>C:\tensorflow1\models\research\object_detection>python3 Object_detection_video.py
>>'python3' is not recognized as an internal or external command, operable program or batch file.

>C:\tensorflow1\models\research\object_detection>python Object_detection_video.py
>>Traceback (most recent call last):File "C:\tensorflow1\models\research\object_detection\Object_detection_video.py", line 21, in <module>
>>>import cv2
>>>ModuleNotFoundError: No module named 'cv2'

>>C:\tensorflow1\models\research\object_detection>conda activate tensorflow1
>>>Erişim engellendi. -->(Translates to Access denied.)

It seems like Python works normally, but cannot activate any environments. I'm using Win 10 Home 64 Bit.

Tried:

  • Tried adding anaconda to PATH or tried the ADD TO PATH option in the setup.
  • Reinstalling anaconda and deleting any traces of python or related stuff.
  • Changing installation location
  • Tried using Anaconda Navigator for creating and modifying envs
  • Using both cmd & powershell (with admin privileges and without)
  • Checking folder security settings (Anaconda and env folder)

Any ideas? Thanks.

Update:

C:\Users\Administrator>conda env list
># conda environments:#
base                  *  C:\ProgramData\Anaconda3
tensorflow1              C:\Users\Administrator\.conda\envs\tensorflow1


C:\Users\Administrator>activate base
Erişim engellendi.
Erişim engellendi.
The system cannot find the file D:\TEMP\conda-2082\conda.tmp.

Maybe it's about User privileges? I am Administrator. Added Full Access to all users in TEMP folder security options but still same issue.

Update #2:

The system cannot find the file D:\TEMP\conda-2082\conda.tmp.

Setting TEMP folder to Windows installed drive "C:" fixed the problem for me.

1 Answer 1

1
  1. Create a new environment
$ conda create -n "tensorflow2" “python=3.5” ipython
  1. Check if the newly created environment, 'tensorflow2' exists
$ conda env list
  1. If environment exists activate it
$ conda activate tensorflow2
  1. If environment doesn't exist, run the below command to delete the environment and repeat steps 1 - 3
$ conda env remove -n tensorflow2
  1. To check if the environment is using the right python executable
$ python
>>> import sys
>>> sys.executable
>>> sys.version
>>> quit()
Sign up to request clarification or add additional context in comments.

3 Comments

I tried commands mentioned, now i get more understandable messages. Erişim engellendi. The system cannot find the file D:\TEMP\conda-2082\conda.tmp. Maybe its a Windows related issue ?
At which step are you getting this error?
At activating environments. Changing TEMP path fixed the problem. Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.