Manually installing old version of selenium, missing folder error - python

I'm trying to install an old version of selemenium since the new version seems to have broken my stuff
C:\Users\Administrator>python C:\Python33\selenium-2.39.0\setup.py install
running install
running bdist_egg
running egg_info
writing top-level names to selenium.egg-info\top_level.txt
writing selenium.egg-info\PKG-INFO
writing dependency_links to selenium.egg-info\dependency_links.txt
warning: manifest_maker: standard file 'setup.py' not found
error: package directory 'py\selenium' does not exist
I get that error, and trust me, that folder does most definitely exist.

Make Selenium your working directory
cd C:\Python33\selenium-2.39.0
And then run python setup.py install

Related

error: package directory <package> does not exist

I already checked the other answers but they didn't help me.
I'd like to upload a package on pypi and this is my setup https://del.dog/vozeworazu.py
When I try to run python setup.py sdist I get this error
running sdist
running egg_info
writing LootGameBotApi.egg-info\PKG-INFO
writing dependency_links to LootGameBotApi.egg-info\dependency_links.txt
writing requirements to LootGameBotApi.egg-info\requires.txt
writing top-level names to LootGameBotApi.egg-info\top_level.txt
error: package directory 'LootGameApi' does not exist
I've tried to put in packages the directory and it worked but when I tried to import it it said it couldn't find the module

How can I best install a Python package (python-ldap3 2.5.1) without easy_install (followup to an older thread)?

I am trying to figure how to install a Python package (ldap3) using a .egg file (fyi, the version of python-ldap3 we need does not have a .whl file) on a system that does not have easy_install available.
I found from an earlier thread (How can I install a .egg Python package on Windows (attempt using easy_install not working)) that I might be able to:
Untar the python-ldap3 tar.gz
Change dir to the untarred dir
run "python setup.py install"
So I tried the above, and it does seem to deploy/install the python-ldap3, but the installation hangs because it looks like it is trying to download something:
# python setup.py install
running install
running bdist_egg
running egg_info
writing requirements to ldap3.egg-info/requires.txt
writing ldap3.egg-info/PKG-INFO
writing top-level names to ldap3.egg-info/top_level.txt
writing dependency_links to ldap3.egg-info/dependency_links.txt
reading manifest file 'ldap3.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'ldap3.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/ldap3
copying ./ldap3/__init__.py -> build/lib/ldap3
copying ./ldap3/version.py -> build/lib/ldap3
creating build/lib/ldap3/abstract
copying ./ldap3/abstract/cursor.py -> build/lib/ldap3/abstract
.
.
.
Installed /usr/lib/python2.6/site-packages/ldap3-2.5.1-py2.6.egg
Processing dependencies for ldap3==2.5.1
Searching for pyasn1>=0.1.8
Reading https://pypi.python.org/simple/pyasn1/
The "python setup.py install" hangs at that last line above ("Reading...."), but if I kill the process then check the python-ldap3 version, it looks like it installed all right:
# pip freeze | grep ldap3
ldap3==2.5.1
Also, FYI, our Python version is 2.6, and the pyasn1 is:
#pip freeze | grep pyasn1
pyasn1==0.4.3
I am not that familiar with Python and Python packaging, so I was wondering:
Is it all right to do the ldap3 2.5.1 installation per above (using
the 'python setup.py install', and then just killing the script)?
If not, what would be a safer/better way to get the ldap3 2.5.1 installed?
Thanks in advance!
Jim
EDIT: I forgot to mention that I think that the reason the script hung at the point it did was that we have to do this installation on an "isolated network", with no access to the external Internet, so we actually prefer/need to do the ldap3 installation without any external access.
EDIT 2: I guess that one other thing that is puzzling is why is the "python setup.py install" trying to get "pyasn1>=0.1.8" when "0.4.3" is already installed, since, from the release history, https://pypi.org/project/pyasn1/#history, "0.1.8" is OLDER than "0.4.3"?
EDIT 3: TO be clear, FYI, the package I am working with it the "ldap3" package, from https://github.com/cannatag/ldap3.

error: package directory '<project_name>' does not exist

I have a simple Python package I've created. I copied the setup.py file from the Python docs, but when I run pip install . I get the following error:
~/Projects/wolfgang (master) $ pip install . Processing /Users/Cisplatin/Projects/wolfgang
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info/wolfgang.egg-info
writing pip-egg-info/wolfgang.egg-info/PKG-INFO
writing top-level names to pip-egg-info/wolfgang.egg-info/top_level.txt
writing dependency_links to pip-egg-info/wolfgang.egg-info/dependency_links.txt
writing manifest file 'pip-egg-info/wolfgang.egg-info/SOURCES.txt'
error: package directory 'wolfgang' does not exist
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/k5/grp3jdnn5jvcd14ffvqyr9z00000gn/T/pip-pWAjtJ-build/
I've tried searching online and there seem to be some similar problems on GitHub or StackOverflow, but they all apply to something being broken in the project itself as opposed to the setup.py file. My program does not mess around with any command line arguments or anything like that, so I'm not sure why this is happening.
Here's a link to the actual setup.py file I'm using, if that helps.
There is no setup.py in your repository because you removed it.
There have to be a subdirectory wolfgang. Both __init__.py and vector.py must be in the subdirectory.

(gclalcli) error: could not create 'build/bdist.linux-x86_64/egg': Permission denied

I'm in a battle with installing gcalcli. I'm using this setup since the other more simple methods aren't working. I'm at the step where I have to type in sudo python setup.py install
I get:
running installenter code here
running bdist_egg
running egg_info
writing requirements to gcalcli.egg-info/requires.txt
writing gcalcli.egg-info/PKG-INFO
writing top-level names to gcalcli.egg-info/top_level.txt
writing dependency_links to gcalcli.egg-info/dependency_links.txt
reading manifest file 'gcalcli.egg-info/SOURCES.txt'
writing manifest file 'gcalcli.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
warning: install_lib: 'build/lib.linux-x86_64-2.7' does not exist -- no Python modules to install
creating build/bdist.linux-x86_64/egg
error: could not create 'build/bdist.linux-x86_64/egg': Permission denied
At this point I had just given permissions to everything to even allow this to run, but I'm not sure what to do from here since it's telling me the python modules don't exist.
I discovered that sudo does not work when in an NFS mounted directory. My /u/ directory is in a NFS mounted directory. I had to created /tmp/module with root. I then copied all the module files into /tmp/module and did: "python setup.py install" as root; and it worked.

Packaging Non-Python Files in a Python Library

I'm trying to build a Python package for this project that includes the .json files in /fixtures and the *.html files in /templates. When I run the packaging script based off my setup.py, it says it should include those folders in the MANIFEST it generates, but the output just says it's hard-linking them and when I try to install via pip, it dies on the following:
Downloading/unpacking bluetrain
Running setup.py egg_info for package bluetrain
error: package directory 'bluetrain/fixtures' does not exist
Complete output from command python setup.py egg_info:
running egg_info
writing pip-egg-info/bluetrain.egg-info/PKG-INFO
writing top-level names to pip-egg-info/bluetrain.egg-info/top_level.txt
writing dependency_links to pip-egg-info/bluetrain.egg-info/dependency_links.txt
warning: manifest_maker: standard file '-c' not found
error: package directory 'bluetrain/fixtures' does not exist
EDIT: It looks like this was an issue with legacy crud that built up in the virtualenv I was installing succeeding versions of the package into. Trying a clean virtualenv fixed the issue.
Fixed this issue by creating a clean virtualenv and trying to build from there. It appears the constant build/ rebuild cycle in the original environment left legacy files behind that were stopping things from working as intended.

Categories