Python: Installing PIP via NTLM from embedded ZIP file - python

So I have downloaded the "Windows x86-64 embeddable zip file" from https://www.python.org/ftp/python/3.7.4/python-3.7.4-embed-amd64.zip and it works well
I want to install PIP so I also got https://bootstrap.pypa.io/get-pip.py
However it's throwing up a 407 proxy authentication error and despite me putting proxy information in, I presume at this point that NTLM is to blame.
My question is how would I get around this? Is it possible to install PIP/Setuptools via the embeddable zip method 100% offline?
I want to eventually use pandas and requests
I tried what pip with embedded python suggests but get the below:
Thanks

It might be complicated but probably not impossible. Also I haven't tested any of this personally, these are more directions that you could look into.
First I would have a look at this. The important point is to find your python??._pth file and uncomment the import site line.
But you say get-pip.py did not work, right? (from here)
python get-pip.py --proxy="http://[user:passwd#]proxy.server:port"
So you could download the wheels another way and then try something like this to bypass the network issues
(from here):
python pip-10.0.1-py2.py3-none-any.whl/pip install --no-index pip-10.0.1-py2.py3-none-any.whl
Once you have pip running you can slowly build a Python environment that is comfortable enough to work with. But I believe you would still be severely limited, I think parts of the standard library will be missing and so on.
Maybe you should work on solving the issues preventing you from getting a standard Python installation instead.

Related

Unable to install packages -- Pycharm -- Python.exec path not working

I am trying to install packages to use in a python program and am unable to install anything. Included below are screen shots showing the interpreter selected, the path of that interpreter, and the error message I receive. Please let me know what I am missing.
I've been looking around at other people's problems like this and nothing seems to fit my issue.
This kind of error seems like you do not have a stable connection to the pypi. The standard recommendation would be to "Make sure you are connected to the internet, Pycharm is allowed through the firewall and that your proxy (if you are behind one) allows access to this url address."
Now that is not very helpful so if this issue is happening over a single package, you can simply download the python wheel from the beautifulsoup's project page and install it manually by running pip install downloaded_whl_file.whl in the Pycharm's terminal (make sure that the environment is right!)
Lastly, you might be able to get around it by using a pip proxy through pip install beautifulsoup4 --proxy http://some-proxy.com
I hope that the above can help you get through your issue!

Installing matplotlib and numpy without pip

I'm running python 3.7 and idle.
I can't use pip because of the firewall at work (I think).
I tried following these instructions:
How to manually install a pypi module without pip/easy_install?
When I try to install matplotlib it looks for numpy, so I assume it's a prerequisite. numpy looks for VS c++ 14.0, so I assume that is also a prerequisite. Are my assumptions right?
Installing VS may be a pain due to hard drive space. I want to make sure I don't do it for nothing.
When I download and unzip the installation folders where is a good place to save them to make life easier? I have a 'python37' folder in c drive and I created a new folder there. Is there somewhere better for referencing?
Please be as explicit as possible in your answers, all of this is new to me.
If you have ability to download and install on your computer, I would recommend just installing/using the Anaconda distribution of Python, which has almost everything you need rolled in (including matplotlib and numpy) with the basics.
https://www.anaconda.com
Turns out the work around is to set a proxy in . I have no idea where the proxy came from and why and how it works but it worked.
I'd still be interested to get answers to my questions though, as someone else might be having similar issues or needing to install downloaded modules on machines which aren't connected to the internet (the latter being very likely for me in the near future).
So to be clear I'm not asking what distribution to use or for other locations to download wheels files. I need to know how to install without using pip on a machine which is not connected to the internet.
apt install python3-numpy
i Guess this will work
Try downloading the packages from https://www.lfd.uci.edu/~gohlke/pythonlibs/ and install them using
pip install name_package.whl

Can't get SFML for Python 2.7

What I'm trying to do
I'm trying to get the SFML binding for Python 2.7. 32-bit version of python using windows.
https://python-sfml.org/download.html
What I've tried
There exe doesn't work because when you click or save the link it returns nothing and says it's missing.
I also used PIP to install Cython which I have, though when I try to use PIP to download pysfml, pySFML, python-sfml or sfml-python, pip tells me:
Could not find a version that satisfies the requirement sfml(from versions:)
No matching distribution found for pysfml.
When I try pip install -vvv pysfml
It also tells me that there is no matching distribution for pysfml.
What I'm asking for
How do I download this library? How do I get it to work for python 2.7
Have emailed the main developers of PySFML and they responded with this:
Thanks for letting us know, we're very aware of this. I already rewrote each page (download + compilation) but download links come with the actual per-compiled packages which aren't created yet. I'll upload them as soon as I finish to setup the continuous integration service that will automate the delivery of these per-compiled packages.
Expect one week before things are done.
Looks like it's just part of the site overhaul that's on-going and should be resolved soon.
Furthermore:
There were never uploaded.^^ These bindings had never been ready for this until recently (see recent commits). However, you can pip install directly from the repository, it must be something like pip git+https://github.com/Sonkun/python-sfml?egg=pySFML.
I know compiling these bindings isn't a straight forward task, however, feel free to ask for assistance. :)
PS: you must use SFML 2.3.2

How do I maintain Python packages on OS X Lion?

What is the correct way to install and update Python packages on OS X Mountain Lion, using Apple's built in Python?
I've tried all everything I can find here and in the documentation for various packages but keep encountering all kinds of errors that result in failed or aborted installations or updates. Notably, with pip I frequently get errors like
RuntimeError: maximum recursion depth exceeded in cmp
or
SError: [Errno 24] Too many open files: '/Library/Python/2.7/site-packages'
and some commands pip commands (like list) just don't seem to exist at all.
I have an uptodate version of pip that works fine with some packages, and have the latest Xcode command line tools installed.
The only thing that seems to work — and it works all the time — is
python setup.py install
Is this the correct way to maintain and install python packages on Lion? Is there any reason not to use this method as my primary method for keeping packages uptodate? Should pip be working for me, or does it not work with Apple's Python?
UPDATE: I spoke too soon. I also have problems with
python setup.py install
Occasionally (often) I'll get:
error: /Library/Python/2.7/site-packages: Too many open files
When nothing is running in a fresh Terminal, I get about 50 when I
lsof | grep python | wc -l
and if I quit Dropbox, which seems to be the source of these, and reduce the number to 0, I still get "Too many open files" for most package installation operations, with whatever tool I use, even after a reboot of my system.
Why am I getting a "too many open files" error so often?
You should be able to maintain exactly as you're doing, but likely need to update your PYTHONPATH to somewhere outside of /Library, hence the reason everyone else is mentioning that and/or using homebrew to install python.
I install python packages with pip and maintain them using:
https://github.com/nvie/pip-tools
First of all, download and install the full Python from the python website.
Then use pip (or homebrew). The built-in python is incomplete in many respects, including mainly, the ability to install new packages. I faced similar problems when I fist got my MacBookPro and installing the full python on top of the built-in one solved all my troubles
Why use Apple's built-in Python? It's incomplete, I think.
I'm using Homebrew and brew install python works fine for me.
From https://github.com/mxcl/homebrew/wiki/Homebrew-and-Python:
We recommend to brew install python because:
Comes with pip (and distribute)
Python (distutils) finds brewed
software (includes, libs), knows about the compiler and flags even if
the command line tools for Xcode are not installed.
No need to set the PYTHONPATH for Homebrew bindings.
No need to work-around the sudo-is-needed-for-easy_install issue

Download error on http://www.pagetemplates.org/: timed out -- Some packages may not be found

does anyone knows what's happeing with:
pagetemplates.org
I am creating a project, and downloading from that repository fails.
It looks like it's out of order for few days already.
I think it's have to do something with Pyramid, but I don't know how to turn it off - to skip downloading that part, or at least how to limit attempts for downloading as right now it keeps running in the loop?
Download error on http://www.pagetemplates.org/: timed out -- Some packages may not be found!
Is there a way to skip this, are thee some setting in some config file? I am trying to locate it in past hour but to avail.
You can limit how easy_install searches for mirrors by using easy_install --allow-hosts 'pypi.python.org' pyramid for example. It's unfortunate that setuptools doesn't default to searching only the official pypi mirrors but I imagine it's due to the feature being introduced before there were official mirrors.
As stated by Siddharth Toshniwal, the problem has been discussed on the pyramid mailing-list.
Python has two package installation system : easy_install and pip. easy_install is the one used when you call python setup.py develop, and fetches the package directly from its website, while pip fetches from the python packages index.
So, while pagetemplates.org (which is the site for the package chameleon) is down, it won't be possible to install chameleon using easy_install, but it should work perfectly with pip. All you need to do is run pip install chameleon then resume what you were doing.

Categories