Every line of 'conda create environment' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
38 def create_env(self, py, args): 39 if py: 40 args = ["--python=%s" % py] + args 41 subprocess.check_call( 42 [sys.executable, '-m', 'virtualenv', str(self.root)] + args, 43 )
Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code
82 def create_virtualenv(self, no_site_packages=True): 83 """Creates the virtual environment and installs PIP. 84 85 Creates the virtual environment and installs PIP only into the 86 virtual environment. 87 """ 88 if not os.path.isdir(self.venv): 89 print 'Creating venv...', 90 if no_site_packages: 91 self.run_command(['virtualenv', '-q', '--no-site-packages', 92 self.venv]) 93 else: 94 self.run_command(['virtualenv', '-q', self.venv]) 95 print 'done.' 96 print 'Installing pip in venv...', 97 if not self.run_command(['tools/with_venv.sh', 'easy_install', 98 'pip>1.0']).strip(): 99 self.die("Failed to install pip.") 100 print 'done.' 101 else: 102 print "venv already exists..." 103 pass