I have a Python script that I'd like to be able to run with a minimum of fuss from the Finder or Quicksilver. Unfortunately, any way of running the script that doesn't use the terminal can't find my libraries.
For example, running
do shell script "~/anaconda/bin/python -c 'import sys; print len(sys.path)'"
from Applescript gives a value of 13, but running
~/anaconda/bin/python -c 'import sys; print len(sys.path)'
from the terminal gives 15. This makes me think that .bash_profile may not be the best place to modify my Python path. Is there a way to make changes to the Python path that will affect both the terminal and everything else? If so, is that the preferred method of modifying the Python path?
Here's some version info for my setup:
Python 2.7.6 |Anaconda 1.8.0 (x86_64)| (default, Nov 11 2013, 10:49:09)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
I have a Python script that I'd like to be able to run with a minimum of fuss from the Finder or Quicksilver. Unfortunately, any way of running the script that doesn't use the terminal can't find my l...
Error: Can‘t find
Python
executable
“
python
“, you can set the
PYTHON
env variable
node-saas 安装失败导致编译不成功
node-saas 更换安装镜像源
vue项目在npm run serve启动时报gyp verb check
python
checking for
Python
executable
“
python
2” in the
PATH
,等等;其实主要是因为项目中的node-sass需要依赖
python
环境运行,所以电脑配置下
python
就行;
python
官网地址,下载的是2.7的,如果打开慢或者下载慢可以直接去腾讯的软件中心下载腾讯地址;
python
包下载完成后傻瓜式安装一路next就行;完事后就是配置环境变量—在你电脑的用户变量的
path
中加
Selenium 自学系列一 8种元素定位方式
文章目录Selenium 自学系列Selenium 背景Selenium WebDriver 交互原理从源码分析 Selenium WebDriverSelenium 的第一个例子:访问百度8种元素定位方式
Selenium 背景
Selenium 是一个web的UI自动化测试工具,它直接运行在浏览器中,本质是通过驱动浏览器,模拟用户的操作
Selenium 目前有3个版本,最新版本为Selenium 3
Selenium
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.remote.w
两种解决方法:
(1)在webdriver.Chrome()中添加
executable
_
path
参数,参数value = chromedriver.exe文件所在
路径
,示例:
from selenium import webdriver
chrome_driver_
path
= "D:\Chrome\chromedriver\chromedriver.exe"