I have a number of django projects organized with the following directory structure using win7 (I'm using GIT_BASH/mingw for my command line) :
envs--r1--project1
--project2
--Include
--Library
--Scripts--python.exe
python275--
The idea being here that the different projects have a common environment and I can activate that environment from each projects root directory using:
$ source ../Scripts/activate
I don't understand exactly how it happened but it turned out that the interpreter ( listed above as python.exe ) was linked somehow to a second python folder above.
I deleted the python275 folder ( AAHH!!) , not realizing its importance, resulting in:
Traceback (most recent call last): File "C:\envs\r1\lib\site.py", line 703, in main() File "C:\envs\r1\lib\site.py", line 692, in main aliasmbcs() File "C:\envs\r1\lib\site.py", line 515, in aliasmbcs import locale, codecs File "C:\envs\r1\lib\locale.py", line 19, in import functools ImportError: No module named functools
I have reinstalled the correct python folder but the error persists. Can anyone advise me on how to rebuild the virtualenvs so I can go back to the way it was?
edit:
(r1)
/C/envs/r1/Scripts
$ import reload(functools)
sh: syntax error near unexpected token `('
(r1)
/C/envs/r1/Scripts
$ python.exe import reload(functools)
sh: syntax error near unexpected token `('
(r1)
/C/envs/r1/Scripts
$ python.exe reload functools
Traceback (most recent call last):
File "C:\envs\r1\lib\site.py", line 703, in <module>
main()
File "C:\envs\r1\lib\site.py", line 692, in main
aliasmbcs()
File "C:\envs\r1\lib\site.py", line 515, in aliasmbcs
import locale, codecs
File "C:\envs\r1\lib\locale.py", line 19, in <module>
import functools
ImportError: No module named functools
(r1)
/C/envs/r1/Scripts
$ reload(functools)
sh: syntax error near unexpected token `('
(r1)
/C/envs/r1/Scripts
$ python.exe reload(functools)
sh: syntax error near unexpected token `('
(r1)
/C/envs/r1/Scripts
$ python.exe test.py
Traceback (most recent call last):
File "f:\envs\r1\lib\site.py", line 703, in <module>
main()
File "f:\envs\r1\lib\site.py", line 692, in main
aliasmbcs()
File "f:\envs\r1\lib\site.py", line 515, in aliasmbcs
import locale, codecs
File "f:\envs\r1\lib\locale.py", line 19, in <module>
import functools
ImportError: No module named functools