Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

activate 2.2 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
  1. # This file must be used with "source bin/activate" *from bash*
  2. # you cannot run it directly
  3. deactivate () {
  4. # reset old environment variables
  5. if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then
  6. PATH="${_OLD_VIRTUAL_PATH:-}"
  7. export PATH
  8. unset _OLD_VIRTUAL_PATH
  9. fi
  10. if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then
  11. PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}"
  12. export PYTHONHOME
  13. unset _OLD_VIRTUAL_PYTHONHOME
  14. fi
  15. # This should detect bash and zsh, which have a hash command that must
  16. # be called to get it to forget past commands. Without forgetting
  17. # past commands the $PATH changes we made may not be respected
  18. if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
  19. hash -r
  20. fi
  21. if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then
  22. PS1="${_OLD_VIRTUAL_PS1:-}"
  23. export PS1
  24. unset _OLD_VIRTUAL_PS1
  25. fi
  26. unset VIRTUAL_ENV
  27. if [ ! "${1:-}" = "nondestructive" ] ; then
  28. # Self destruct!
  29. unset -f deactivate
  30. fi
  31. }
  32. # unset irrelevant variables
  33. deactivate nondestructive
  34. VIRTUAL_ENV="/Users/daniellagrimberg/itc/first-repo/env"
  35. export VIRTUAL_ENV
  36. _OLD_VIRTUAL_PATH="$PATH"
  37. PATH="$VIRTUAL_ENV/bin:$PATH"
  38. export PATH
  39. # unset PYTHONHOME if set
  40. # this will fail if PYTHONHOME is set to the empty string (which is bad anyway)
  41. # could use `if (set -u; : $PYTHONHOME) ;` in bash
  42. if [ -n "${PYTHONHOME:-}" ] ; then
  43. _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}"
  44. unset PYTHONHOME
  45. fi
  46. if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
  47. _OLD_VIRTUAL_PS1="${PS1:-}"
  48. if [ "x(env) " != x ] ; then
  49. PS1="(env) ${PS1:-}"
  50. else
  51. if [ "`basename \"$VIRTUAL_ENV\"`" = "__" ] ; then
  52. # special case for Aspen magic directories
  53. # see http://www.zetadev.com/software/aspen/
  54. PS1="[`basename \`dirname \"$VIRTUAL_ENV\"\``] $PS1"
  55. else
  56. PS1="(`basename \"$VIRTUAL_ENV\"`)$PS1"
  57. fi
  58. fi
  59. export PS1
  60. fi
  61. # This should detect bash and zsh, which have a hash command that must
  62. # be called to get it to forget past commands. Without forgetting
  63. # past commands the $PATH changes we made may not be respected
  64. if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
  65. hash -r
  66. fi
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...