Installing selenium for Python in Windows 7 - python

I am trying to install "selenium-2.44.0" for "Python-3.4.1" on Windows 7 64 bit machine. I downloaded "selenium-2.44.0.tar.gz" and extracted to "Desktop" folder.
When I execute the command:
C:\Python34>python C:\Users\User_Name\Desktop\selenium-2.44.0\setup.py install
I get the following output:
running install
running bdist_egg
running egg_info
creating selenium.egg-info
writing selenium.egg-info\PKG-INFO
writing dependency_links to selenium.egg-info\dependency_links.txt
writing top-level names to selenium.egg-info\top_level.txt
writing manifest file 'selenium.egg-info\SOURCES.txt'
warning: manifest_maker: standard file 'setup.py' not found
error: package directory 'py\selenium' does not exist
running install
running bdist_egg
running egg_info
creating selenium.egg-info
writing selenium.egg-info\PKG-INFO
writing dependency_links to selenium.egg-info\dependency_links.txt
writing top-level names to selenium.egg-info\top_level.txt
writing manifest file 'selenium.egg-info\SOURCES.txt'
warning: manifest_maker: standard file 'setup.py' not found
error: package directory 'py\selenium' does not exist
But, within "selenium-2.44.0" folder, "py\selenium" directory exists.
Help!!
Thanks

As I mentioned in the comments, I can install selenium using the following when in the untarred archive's directory:
c:\Python34\python.exe setup.py install
This worked for me on Windows 7 with selenium 2.44.0.
Another way to install it would be to use pip:
c:\python34\scripts\pip.exe install selenium
Occasionally when installing packages on Windows, the package you download is corrupted or incomplete and you need to try reinstalling.

Related

Python build tools install & package task.setvariable fails

I'm trying to use Python build tools to run CI for my project.
However the recomended "Install Python" task fails with Unable to process command '##vso[task.setvariable :
2018-11-27T09:01:45.8077207Z ##[section]Starting: Install Python
2018-11-27T09:01:45.8084595Z ==============================================================================
2018-11-27T09:01:45.8084738Z Task : Install Python on Windows
2018-11-27T09:01:45.8084853Z Description : Installs one or more Python versions into your build environment
2018-11-27T09:01:45.8084937Z Version : 1.0.13
2018-11-27T09:01:45.8085016Z Author : Steve Dower
2018-11-27T09:01:45.8085188Z Help : The *Install Python* task will install Python using a package from [nuget.org](https://nuget.org) and add it to `PATH`. These packages are part of the official release of CPython.
Most other tasks assume you have already run this task to install the desired runtime. The folder where they are installed is customizable, but be aware that you may need to update subsequent task configuration if you change this.
The recommended configuration for using this task with multiple versions of Python is to enable multi-configuration on the phase and specify the version number as a Multiplier. See [the documentation](https://go.microsoft.com/fwlink/?linkid=835763) for information about parallel execution.
(Note that the first-party *Use Python Version* task is preferable on the Hosted queues and works on all platforms, though as of 02 May 2018 is not fully available.)
2018-11-27T09:01:45.8085489Z ==============================================================================
2018-11-27T09:02:00.5624146Z ##[command]"C:\vsts-agent\_work\_tasks\InstallPython_6095fbbe-853d-4f2e-bc15-a88c92a78b4d\1.0.13\nuget.exe" install -OutputDirectory "C:\vsts-agent\_work\_tool\PythonNuget" python
2018-11-27T09:02:02.3259235Z Feeds used:
2018-11-27T09:02:02.3260274Z https://api.nuget.org/v3/index.json
2018-11-27T09:02:02.3265409Z
2018-11-27T09:02:02.3356523Z Installing package 'python' to 'C:\vsts-agent\_work\_tool\PythonNuget'.
2018-11-27T09:02:03.3744998Z GET https://api.nuget.org/v3/registration3-gz-semver2/python/index.json
2018-11-27T09:02:04.2195046Z OK https://api.nuget.org/v3/registration3-gz-semver2/python/index.json 844ms
2018-11-27T09:02:04.6414413Z Package "python.3.7.1" is already installed.
2018-11-27T09:02:04.9698862Z ##[error]Unable to process command '##vso[task.setvariable variable=pythonLocation;issecret=False]C:\vsts-agent\_work\_tool\PythonNuget\python.3.7.1\tools' successfully. Please reference documentation (http://go.microsoft.com/fwlink/?LinkId=817296)
2018-11-27T09:02:04.9723742Z ##[error]Value cannot be null.
Parameter name: RefName
2018-11-27T09:02:05.0583055Z ##[section]Finishing: Install Python
The install itself seems to have worked, because I can disable that step and run the package task with the variable manually set.
However this task also fails with a similar error:
2018-11-27T09:19:58.1789219Z ##[section]Starting: Build wheels from setup.py
2018-11-27T09:19:58.1797911Z ==============================================================================
2018-11-27T09:19:58.1798116Z Task : Build Python wheels
2018-11-27T09:19:58.1798220Z Description : Creates a wheel using an installed copy of Python.
2018-11-27T09:19:58.1798313Z Version : 1.0.6
2018-11-27T09:19:58.1798408Z Author : Steve Dower
2018-11-27T09:19:58.1798530Z Help : The *Build Python wheels* task uses a `setup.py` file to compile wheels. It will ensure that `pip`, `wheel`, `setuptools` and `cython` are installed before running.
2018-11-27T09:19:58.1798632Z ==============================================================================
2018-11-27T09:20:00.1574022Z ##[command]"C:\vsts-agent\_work\_tool\PythonNuget\python.3.7.1\tools\python.exe" -m pip install pip setuptools wheel cython
2018-11-27T09:20:09.3277504Z Requirement already satisfied: pip in c:\vsts-agent\_work\_tool\pythonnuget\python.3.7.1\tools\lib\site-packages (10.0.1)
2018-11-27T09:20:09.3647762Z Requirement already satisfied: setuptools in c:\vsts-agent\_work\_tool\pythonnuget\python.3.7.1\tools\lib\site-packages (39.0.1)
2018-11-27T09:20:09.4030940Z Collecting wheel
2018-11-27T09:20:10.1048438Z Downloading https://files.pythonhosted.org/packages/ff/47/1dfa4795e24fd6f93d5d58602dd716c3f101cfd5a77cd9acbe519b44a0a9/wheel-0.32.3-py2.py3-none-any.whl
2018-11-27T09:20:10.2095319Z Collecting cython
2018-11-27T09:20:10.8171412Z Downloading https://files.pythonhosted.org/packages/de/c8/daeef2f83ae402fc3c3eef4295e07fc46b267e5f12c7a8ee05b685de5c59/Cython-0.29.1-cp37-cp37m-win_amd64.whl (1.7MB)
2018-11-27T09:20:11.6943676Z Installing collected packages: wheel, cython
2018-11-27T09:20:11.8283445Z The script wheel.exe is installed in 'C:\vsts-agent\_work\_tool\PythonNuget\python.3.7.1\tools\Scripts' which is not on PATH.
2018-11-27T09:20:11.8283671Z Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
2018-11-27T09:20:15.3438913Z The scripts cygdb.exe, cython.exe and cythonize.exe are installed in 'C:\vsts-agent\_work\_tool\PythonNuget\python.3.7.1\tools\Scripts' which is not on PATH.
2018-11-27T09:20:15.3439571Z Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
2018-11-27T09:20:15.3891222Z Successfully installed cython-0.29.1 wheel-0.32.3
2018-11-27T09:20:15.8153804Z You are using pip version 10.0.1, however version 18.1 is available.
2018-11-27T09:20:15.8154881Z You should consider upgrading via the 'python -m pip install --upgrade pip' command.
2018-11-27T09:20:15.9164164Z ##[command]"C:\vsts-agent\_work\_tool\PythonNuget\python.3.7.1\tools\python.exe" "C:\vsts-agent\_work\1\s\setup.py" build --build-base "C:\vsts-agent\_work\1\b" bdist_wheel -d "C:\vsts-agent\_work\1\a" --universal
2018-11-27T09:20:17.2811564Z running build
2018-11-27T09:20:17.2812503Z running build_py
2018-11-27T09:20:17.7476566Z creating C:\vsts-agent\_work\1\b\lib
2018-11-27T09:20:17.7478546Z creating C:\vsts-agent\_work\1\b\lib\pvsdockerlib
2018-11-27T09:20:17.7487714Z copying pvsdockerlib\functions.py -> C:\vsts-agent\_work\1\b\lib\pvsdockerlib
2018-11-27T09:20:17.7509731Z copying pvsdockerlib\__init__.py -> C:\vsts-agent\_work\1\b\lib\pvsdockerlib
2018-11-27T09:20:17.7528017Z running bdist_wheel
2018-11-27T09:20:17.7948184Z installing to C:\vsts-agent\_work\1\b\bdist.win-amd64\wheel
2018-11-27T09:20:17.7950366Z running install
2018-11-27T09:20:17.7960351Z running install_lib
2018-11-27T09:20:17.8287382Z creating C:\vsts-agent\_work\1\b\bdist.win-amd64
2018-11-27T09:20:17.8290061Z creating C:\vsts-agent\_work\1\b\bdist.win-amd64\wheel
2018-11-27T09:20:17.8300030Z creating C:\vsts-agent\_work\1\b\bdist.win-amd64\wheel\pvsdockerlib
2018-11-27T09:20:17.8310198Z copying C:\vsts-agent\_work\1\b\lib\pvsdockerlib\functions.py -> C:\vsts-agent\_work\1\b\bdist.win-amd64\wheel\.\pvsdockerlib
2018-11-27T09:20:17.8333787Z copying C:\vsts-agent\_work\1\b\lib\pvsdockerlib\__init__.py -> C:\vsts-agent\_work\1\b\bdist.win-amd64\wheel\.\pvsdockerlib
2018-11-27T09:20:17.8348679Z running install_egg_info
2018-11-27T09:20:18.0161526Z running egg_info
2018-11-27T09:20:18.0162158Z creating pvs_dockerlib.egg-info
2018-11-27T09:20:18.0169182Z writing pvs_dockerlib.egg-info\PKG-INFO
2018-11-27T09:20:18.0184157Z writing dependency_links to pvs_dockerlib.egg-info\dependency_links.txt
2018-11-27T09:20:18.0199803Z writing requirements to pvs_dockerlib.egg-info\requires.txt
2018-11-27T09:20:18.0208911Z writing top-level names to pvs_dockerlib.egg-info\top_level.txt
2018-11-27T09:20:18.0227310Z writing manifest file 'pvs_dockerlib.egg-info\SOURCES.txt'
2018-11-27T09:20:18.0262855Z reading manifest file 'pvs_dockerlib.egg-info\SOURCES.txt'
2018-11-27T09:20:18.0307698Z writing manifest file 'pvs_dockerlib.egg-info\SOURCES.txt'
2018-11-27T09:20:18.0320556Z Copying pvs_dockerlib.egg-info to C:\vsts-agent\_work\1\b\bdist.win-amd64\wheel\.\pvs_dockerlib-0.1-py3.7.egg-info
2018-11-27T09:20:18.0449785Z running install_scripts
2018-11-27T09:20:18.2548207Z adding license file "LICENSE" (matched pattern "LICEN[CS]E*")
2018-11-27T09:20:18.2597715Z creating C:\vsts-agent\_work\1\b\bdist.win-amd64\wheel\pvs_dockerlib-0.1.dist-info\WHEEL
2018-11-27T09:20:18.2616849Z creating 'C:\vsts-agent\_work\1\a\pvs_dockerlib-0.1-py2.py3-none-any.whl' and adding 'C:\vsts-agent\_work\1\b\bdist.win-amd64\wheel' to it
2018-11-27T09:20:18.2642603Z adding 'pvsdockerlib/__init__.py'
2018-11-27T09:20:18.2660569Z adding 'pvsdockerlib/functions.py'
2018-11-27T09:20:18.2668323Z adding 'pvs_dockerlib-0.1.dist-info/LICENSE'
2018-11-27T09:20:18.2674321Z adding 'pvs_dockerlib-0.1.dist-info/METADATA'
2018-11-27T09:20:18.2679798Z adding 'pvs_dockerlib-0.1.dist-info/WHEEL'
2018-11-27T09:20:18.2685103Z adding 'pvs_dockerlib-0.1.dist-info/top_level.txt'
2018-11-27T09:20:18.2688000Z adding 'pvs_dockerlib-0.1.dist-info/RECORD'
2018-11-27T09:20:18.2691808Z removing C:\vsts-agent\_work\1\b\bdist.win-amd64\wheel
2018-11-27T09:20:18.2719804Z C:\vsts-agent\_work\_tool\PythonNuget\python.3.7.1\tools\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'long_description_content_type'
2018-11-27T09:20:18.2720555Z warnings.warn(msg)
2018-11-27T09:20:18.5079776Z ##[error]Unable to process command '##vso[task.setvariable variable=dist;issecret=False]C:\vsts-agent\_work\1\a' successfully. Please reference documentation (http://go.microsoft.com/fwlink/?LinkId=817296)
2018-11-27T09:20:18.5106520Z ##[error]Value cannot be null.
Parameter name: RefName
2018-11-27T09:20:18.5664259Z ##[section]Finishing: Build wheels from setup.py
How is this possible when Python build tools uses the built in powershell command Set-VstsTaskVariable?
Github Python build tools install set pythonLocation var
Github Python build tools package set dist var
Is this a bug in the azure-pipelines-agent? I'm using the latest pre-release v2.141.2, and on-prem TFS 2017 update 3.1

Error: could not determine PostgreSQL version from "10.4"

Complete output from command python setup.py egg_info: running
egg_info creating pip-egg-info/psycopg2.egg-info writing
pip-egg-info/psycopg2.egg-info/PKG-INFO writing top-level names to
pip-egg-info/psycopg2.egg-info/top_level.txt writing dependency_links
to pip-egg-info/psycopg2.egg-info/dependency_links.txt writing
manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt' Error:
could not determine PostgreSQL version from '10.4'
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-lR9u0X/psycopg2/
Does anyone know what's the issue? Trying to run pgadmin in virtualenv and can't figure out because of this error.
A higher version of psycopg2 fixed the issue for me, update your requirements.txt to:
...
psycopg2==2.7.5
...
Solution for me:
$wget https://files.pythonhosted.org/packages/51/2f/48c3bda0b629f6e6b2c0dc57d737f2612389d2c43797209034c604349b71/redshift-sqlalchemy-0.4.tar.gz
$ tar -zxvf redshift-sqlalchemy-0.4.tar.gz
Change inside requires.txt psycopg2==2.5 to psycopg2 (2.7.6.1)
$vi redshift-sqlalchemy-0.4/redshift_sqlalchemy.egg-info/requires.txt
.......
psycopg2==2.7.6.1 <---Change Here
SQLAlchemy>=0.8.0
.................
Change inside setup.py psycopg2
$vi redshift-sqlalchemy-0.4/setup.py
CHANGE
..........
install_requires=['psycopg2==2.5', 'SQLAlchemy>=0.8.0'],
..........
TO
..........
install_requires=['psycopg2==2.7.6.1', 'SQLAlchemy>=0.8.0'],
Run the manual pip installation
$ pip install -r redshift-sqlalchemy-0.4/redshift_sqlalchemy.egg-info/requires.txt file:///home/etl/redshift-sqlalchemy-0.4/

PIP install "error: package directory 'X' does not exist"

I am trying to install this package via PIP. It gives me the following error:
error: package directory 'RTbatch' does not exist
I find this weird, because the relevant setup.py does not mention any packages variable, but only py_modules.
What's wrong? Can you help me out?
Here is the full output of pip install -e RTbatch:
Obtaining file:///home/chymera/RTbatch
Running setup.py (path:/home/chymera/RTbatch/setup.py) egg_info for package from file:///home/chymera/RTbatch
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'heywords'
warnings.warn(msg)
error: package directory 'RTbatch' does not exist
Complete output from command python setup.py egg_info:
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'heywords'
warnings.warn(msg)
running egg_info
creating RTbatch.egg-info
writing requirements to RTbatch.egg-info/requires.txt
writing RTbatch.egg-info/PKG-INFO
writing top-level names to RTbatch.egg-info/top_level.txt
writing dependency_links to RTbatch.egg-info/dependency_links.txt
writing manifest file 'RTbatch.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
error: package directory 'RTbatch' does not exist
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /home/chymera/RTbatch
Storing debug log for failure in /home/chymera/.pip/pip.log
py_modules takes a list of module names, not files. Your call looks for RTBatch/py.py and RTBatch_cli/py.py.
In my case, it was about that the folder which I use for installation was corrupted. It was not installed completely. I downloaded it on my laptop and then moved it to the server. But it was broken. so I download it again and everything goes well.
In my case, I was on Windows and the current directory was in a different drive, python <full path including drive>/setup.py install fails, had to change to the drive and folder and use python setup.py instead.
It seems you have added project folder (RTbatch) as a package in setup.py. Just make sure to have packages list in setup.py contains only python packages (ex: folders with init.py).
Hope this fix the issue.

I can't install python package, although required libraries exist

I am trying to install a Python package and I get a dependency error but I am sure I have fulfilled that requirement.
It says that it can't find libdickinson.so, but this library is already installed (system wide) and its files are in /user/local/lib/. What am I doing wrong?
This is my console output:
(iwidget)chris#mint-desktop ~ $ pip install pthelma
Downloading/unpacking pthelma
Downloading pthelma-0.7.2.tar.gz (50kB): 50kB downloaded
Running setup.py egg_info for package pthelma
libdickinson.so: cannot open shared object file: No such file or directory
Please make sure you have installed dickinson
(see http://dickinson.readthedocs.org/).
Complete output from command python setup.py egg_info:
libdickinson.so: cannot open shared object file: No such file or directory
Please make sure you have installed dickinson
(see http://dickinson.readthedocs.org/).
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /home/chris/.virtualenvs/iwidget/build/pthelma
Storing complete log in /home/chris/.pip/pip.log
(iwidget)chris#mint-desktop ~ $ ls /usr/local/lib/
libdickinson.a libdickinson.la libdickinson.so libdickinson.so.0 libdickinson.so.0.0.0 python2.7/ python3.2/ site_ruby/
(iwidget)chris#mint-desktop ~ $
Also try the above command as superuser:
sudo pip install pthelma
and just go through the thread given below:
Why can't Python find shared objects that are in directories in sys.path?
Try building it yourself and installing from the GIT repo:
git clone https://github.com/openmeteo/pthelma.git
Also, try running it as super user (pip).
sudo pip install pthelma
It looks like it can't see the libdickinson.so file but if you're confident it's installed and setup correctly you can, as I said, try cloning the source and building it that way.

Python's “easy_install” on Windows - HtmlCSSInclude

I just installed Python 2.7 and easy_install-2.7.exe on my Windows 2003 server, then set %PATH% to C:\Python27;C:\Python27\Scripts;. Then I tried to install a python package with easy_install, but easy_install failed. The failure follows:
C:\>easy_install HtmlCssInclude
Searching for HtmlCssInclude
Reading http://pypi.python.org/simple/HtmlCssInclude/
Best match: HtmlCssInclude 0.1.2
Downloading http://pypi.python.org/packages/source/H/HtmlCssInclude/HtmlCssInclu
de-0.1.2.tar.gz#md5=0b4438bf62ae66842a514dcff67c0cd7
Processing HtmlCssInclude-0.1.2.tar.gz
Running HtmlCssInclude-0.1.2\setup.py -q bdist_egg --dist-dir c:\docume~1\admini
~1\locals~1\temp\1\easy_install-qpossf\HtmlCssInclude-0.1.2\egg-dist-tmp-haku7q
C:\Python27\Lib\distutils\dist.py:267: UserWarning: Unknown distribution option:
'auther'
warnings.warn(msg)
warning: no files found matching 'testdata'
error: Setup script exited with error: can't copy 'sample.css': doesn't exist or
not a regular file
Anybody please help me.
I tried editing this package and it installed.
Downloaded the package and edited HtmlCssinclude.py. In addition i found the reference to 'sample.css' and 'testdata' is not necessary for this package installation. So i also removed those reference. This help me to install package from local folder.

Categories

Resources