P
P
Philip Polikarenkov2015-12-07 13:45:38
Python
Philip Polikarenkov, 2015-12-07 13:45:38

How to install a module in python 3?

Good afternoon.
I have a few problems with modules in python.
I have Windows XP, Python 3.4.
There is a patool module, I wanted to install it locally - I go into the folder with the downloaded module, find setup.py, write through the command line:
setup.py install --home f:/python34/
Then the lines run, something is compiled, installed, assembled, etc., there seem to be no errors.
I try to import the installed, writes the module is not found.
I'm trying to install this module through pip, but at work the Internet is through a proxy. Then I set up the cntlm program, specify pip through which proxy to climb:

pip --proxy <<здесь пишу прокси, который слушает cntlm>> install patool

And nothing comes out. Gives an error stating that the proxy has closed access.
I tried to specify a proxy without using cntlm, the same crap.
cntlm definitely works, because when I point the browser to a listening proxy, it works through it.
How can I install a module and how do I know what to import?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
S
s0ci0pat, 2015-12-08
@Vilibb

If you need exactly the patoolib module for your script, then just download the patool-1.9.tar.gz archive.
Then open it with an archiver (7zip does a great job)
Get the patoolib directory and place it in the directory where you run your script from.

A
Andy_U, 2015-12-07
@Andy_U

Use the pip utility. She is quite able to "leak" through a proxy, even with authentication. Or, just checked - Pycharm downloaded and installed it (your patool) without any problems.
PS What is your proxy?

D
Dmitry, 2015-12-07
@EvilsInterrupt

Tip: Get out of the habit of putting modules in a common heap. Instead, use virtual environments. virtualenv, or the venv module from the standard library.
Do this:
1. create a folder {your-project-name}
2. cd {your-project-name}
3. Run cmd.exe
4. In an open console run "c:\python34\python.exe -m venv pyenv"
5. Remaining in the console, execute "pyenv\scripts\activate.bat"
6. Unpack the archive of your patool
7. Going into the archive folder, execute 'python setup.py install' You
may need to run the cmd.exe console as an administrator. There is a small chance that this will need to be done.

M
mukizu, 2015-12-07
@mukizu

>I'm trying to import the installed
How are you trying? Example code and file location

Z
Zakharov Alexander, 2015-12-07
@AlexZaharow

How familiar. I also use cntlm, but I put fiddler in front of it and send all requests through fiddler. It is very clearly visible that it is walking through proxy cntlm.

P
Philip Polikarenkov, 2015-12-08
@Vilibb

5f5c074893704adbb3a2486c400fc7e4.jpg

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question