Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

install a module without pip/easy_install or "python setup.py install"

Tags:

python

I am trying to install the ptyprocess module: https://github.com/pexpect/ptyprocess.

I cannot do a "pip install ptyprocess" as my pip is blocked by ssl issues on the server.

Also, I cannot clone the above repository and run a "python setup.py install" since there is no setup.py in the repository; instead there is a pyproject.toml which requires "pip install pyproject.yoml", but again, this is reliant on pip which is blocked.

How then can I install this module?

p.s. I've installed other modules on my server via github, but they have the desired "setup.py" and not "pyproject.toml", therefore I was able to run "python setup.py install" successfully.

like image 499
Alias Avatar asked Sep 02 '26 19:09

Alias


1 Answers

To install a module copy the pytprocess folder (or whatever folder contains the topmost __init__.py) to your site-packages (usually in {python location}\lib\site-packages) directory. You may still need to manually install the dependencies, (in this case flit) as well. Note this only works if the package is pure python.

like image 195
mousetail Avatar answered Sep 05 '26 07:09

mousetail