I am trying virtual env for the first time in python. I have Python 3.6 and Python 2.7 installed in my machine. I have installed all the necessary packages in Python 3.6. However, the code that I have seems to be compatible with Python 2.7. Hence I opted for Virtaul Env. But I could not access the packages that i need. I have went through the questions in stack overflow but nothing helped. I have tried following steps:
- Created new project in pycharm
- used the interpreter as Python27
- in command prompt, I went to specific virtual env folder and tried pip install package_name
showing the error as below
Fatal Python error: Py_Initialize: unable to load the file system codec File "D:\Users\username\venv_name\lib\encodings\__init__.py", line 123 raise CodecRegistryError,\ ^ SyntaxError: invalid syntax Current thread 0x0000d85c (most recent call first):
I need either to install packages in the venv or transfer already installed packages into venv.
Thanks