Install lxml without pip - python-3.x

Objective -
To install lxml on the machine without pip
Issue
Due to my company firewall and lack of admin access, I am not able to use pip. It throws an error. Hence I am not able to install pip
Steps taken till now
On my development machine(windows 7), I dont have admin access hence I cannot use pip or easy_install. For BeuatifulSoup & requests, I downloaded the source and put the source in Python34 -> Lib folder. For lxml as well I have downloaded the source file and put it under Lib folder but I still get the same error.
Please note, I cannot ask for Admin access, because its my personal project and my organization will not provide admin access for personal project.
Hence, I want to know how can I install or use lxml on my system.

lxml is at least partly coded in C, and putting C source in /Lib does not work, as you found.
If you are allowed, download a Windows installer and install for 'this user only'. It would probably work better to use 3.5.1, to avoid clashes with the already installed 3.4. You could then use pip to install packages.

Related

Using user's dir to store copied python3 packages

I'm defining an update procedure on the air-gapped standalone RedHat7 server with the preinstalled python3 and
basic packages.
The python3 applications are developed on a host with an Internet access, and are delivered to this standalone
server using DOK.
Additional packages can't be installed using pip, but must be trasfered from development host to the local user's home directory.
I'm looking for a proper way to update and activate python3 applications on this standalone server, without appending a new package path using sys.path.append("/home/user/packages/pack_N") before importing it.
Thanks
Zeev
I'm assuming you meant without using "PyPi".
Downloading the packages can be done with pip wheel <package> after installing the wheel package.
Installing them locally without using pip's servers (PyPi) can be done like so:
pip install <package> --no-index --find-links=<directory containing wheels>

how to do pip install manually

i'm trying to run this code
pip install pandas
from my company laptop, but i think to have a firewall block.
getting this error:
Could not find a version that satisfies the requirement pandas (from versions: ) No matching distribution found for pandas
I can't modify the firewall settings (in order to fix my problem) and i'm guessing if there is alternative way to download & install all libraries into python3.
Could i dowload the library and then paste it into a folder?
PS. i'm using pycharm
Thank you
Download appropriate file matching your Python version and architecture from https://pypi.org and then install it locally with pip, i.e.:
$ pip install --user pandas-0.25.1-cp36-cp36m-manylinux1_x86_64.whl
Processing ./pandas-0.25.1-cp36-cp36m-manylinux1_x86_64.whl
...
Note that the package might require further dependencies, so you might need to repeat for different packages.
If your machine requires a proxy, add this bit after install:
--proxy=http://sub_domain_proxy.sub_domain.domain:port

Pip Uninstall and Install same package gives 'AssertionError: Multiple .dist-info directories'

I am having trouble installing and installing again the same package. I get an 'AssertionError: Multiple .dist-info directories' error. I think that it has something to do with the pip uninstall not completely getting rid of all the files of a package, but am not sure how to remedy the situation. I don't know what information would be helpful here, except maybe that this is a Django project, running on virtualenv on IIS.
EDIT: I just re-installed python and with it, a new version of pip.
Remove the related pip build directory for that particular package and try installing it again. That'd work.
If you're working in a virtual environment say venv, pip build directory will be <path-to-venv>/venv/build/<package-name>.

How can I install Image class in Python 3 Ubuntu 14.04?

I am trying to use the PIL in Python 3, but there is no way I can make it work. I tried several links, but none of them really helped.
I am using Ubuntu 14.04 and installed IDLE.
Can anyone here, please help me?
Thanks in advance,
sudo apt-get install python3-pil python3-pil.imagetk
You may need to manually remove any left-overs of non-successful installs tried with pip or compiling with setup.py - this will be indicated by conflicting files listed in the error message.
The rule of thumb is: If you want a Python general tool for interactive use, or that provides scripts you will use directly, libraries for small scripts for personal use: you have to install the package built for your system (the .deb) with apt-get, aptitude whatever - unless that Python module is not packaged at all.
For all other uses, you should create a Python virtualenv and install the desired modules inside that virtualenv with pip install <name>. Including the cases Ubuntu does not have the desired Python module packaged.
Regarding PIL there is still another interesting bit: the original PIL had become unmaintained and bit-rot over the years. One of the most proeminent bugs arising from that is exactly it inability to be cleanly installed using pip or easy_install. Another one is that it never was (at least properly) ported to work with Python3. Due to that a fork named "Pillow" was created. It is a drop-in replacement for the orinal PIL - PIP and Easy_install should install "Pillow" and not "PIL".
(NB. I do not know which PIL or Pillow - is packaged by Ubuntu under the "python-pil" names. I suppose and hope it is the actively maintained project Pillow)

iPython on Win8 fails to install modules

Please bear with me the total novice of Python 3 and non native English speaker.
I'm using windows 8 in iPython notebook environment, and I have problem installing modules such as Jieba. If you go to its homepage, the English version is in the bottom (however, not as updated as the Chinese version). It says it supports Python 3 as well, so I tried using git as it suggested, but it gave me this (I successfully cloned it before).
Some other things I tried as well
Using cmd to run setup.py
Using pip3 (it's another module I failed to install)
Installing easy_install (same, couldn't install it)
Do I have to use other approaches to install modules cause I'm using iPython notebook? I'm so frustrated. I'm trying to do text mining on some Chinese texts but I struggle so much with this hurdle already.
You've already cloned Jieba into your home directory (~), which is why your second attempt at cloning failed. Enter the jieba directory, and run git pull to sync any changes from the master repo. You can then run python setup.py install in that directory to install the module.
To install pip on Windows, follow the instructions in this question.

Resources