-2

Trying to run virtualenv with my project, but it shows some errors. Couldn't find a right solution, unfortunately. Maybe someone has dealt with the same issue before.

(base) Organic:djangoproject organic$ mkvirtualenv py1
Using base prefix '/anaconda3'
New python executable in /Users/organic/.virtualenvs/py1/bin/python3
Traceback (most recent call last):
  File "/anaconda3/bin/virtualenv", line 11, in <module>
    load_entry_point('virtualenv==16.1.0.dev0', 'console_scripts', 'virtualenv')()
  File "/anaconda3/lib/python3.6/site-packages/virtualenv.py", line 712, in main
    symlink=options.symlink)
  File "/anaconda3/lib/python3.6/site-packages/virtualenv.py", line 928, in create_environment
    site_packages=site_packages, clear=clear, symlink=symlink))
  File "/anaconda3/lib/python3.6/site-packages/virtualenv.py", line 1234, in install_python
    shutil.copyfile(executable, py_executable)
  File "/anaconda3/lib/python3.6/shutil.py", line 121, in copyfile
    with open(dst, 'wb') as fdst:
OSError: [Errno 62] Too many levels of symbolic links: '/Users/organic/.virtualenvs/py1/bin/python3'
organicnz
  • 89
  • 1
  • 2
  • 19
  • Looks like you created a virtual-environment called as base. And then after you are trying to create another virtual-environment. I think you should try https://stackoverflow.com/questions/51499950/where-do-i-put-my-python-files-in-the-venv-folder/51500506#51500506 – JR ibkr Sep 28 '18 at 17:35
  • 2
    You should not mix Anaconda environments and virtualenv environments. Just use Anaconda environments if you're using conda. – darthbith Sep 28 '18 at 18:04
  • My apologies guys I'm a very newbie with this tools. So, I've chosen that Anaconda's interpreter via vsc and running throughout it. – organicnz Sep 29 '18 at 18:55

1 Answers1

0

Thank you guys I have resolved this issue by figuring out how to switch onto a proper virtualenv throughout Anaconda on VS Code. So, for now, I'm using only (base) virtualenv that was already set up by default to conda. And all my last projects seem to be working with no side issues so far.

To whom that doesn't know on VS Code on MAC OS use shift+command+p -> Python: Select Interpreter, then select Anaconda interpreter Python 3.6.6 64-bit ('base': conda) anaconda3/bin/python. Notice that your virtualenv can have a different name instead 'base'.

After, again click shift+command+p choose Python: Create Terminal and VSC will run a terminal down below where your virtualenv will be turned on like in my situation (base) Organic:django_project organic$.

organicnz
  • 89
  • 1
  • 2
  • 19