How to install ewswrapper for python off of their site on a windows, (sadly), 64 bit machine with python 2.7.
The Link to the site is here.
Thank you for your help.
The generally recommended way to install python packages is using a package manager like pip or (gasp) easy_install. However, there are a few exceptions like this one.
On Windows, there may be a pre-built package for you to download. In this case, the link is http://ewswrapper.lafiel.net/index.php?al3x_download=file&userid=PUBLIC&filepath=/PYTHON_Releases/_PYTHON_2012_02_09_EWSWrapper_v_0_2.7z.
You'll need to unzip the file with 7zip, and place the resulting directory in your site-packages path. You can locate your system's site-packages path by looking at this SO answer: How do I find the location of my Python site-packages directory?
Additionally, EWSWrapper will require a few dependencies that you should be able to get in pip.
pip.exe install python-ntlm suds
If you don't have pip, you can install it: How do I install pip on Windows?
Just so you know, this isn't the normal way a package is installed. Perhaps someone should let them know...
Related
I have tried to create envelope on my linux pop os system using miniconda. When I activate it, I can install packages using pip, but when I run my django instance it doesn't find the modules.
If I type which python is shows the miniconda path correctly. I can look in the site-packages folder and see the packages installed.
I've tried installing django-anymail and corsheaders and they are both not being found. It does find my locally installed apps.
If I use the command line and open python and then import, it does not recognize my modules installed in the virtual envelope either. I thought it was a problem with conda, so I also created an envelope using python's native method: python3 -m venv
I have the same problem with it finding pip install site-packages.
Is there a command I can run to show all available packages?
I hadn't realized I had aliased my python. Now it is working.
I have a python application that has flask dependency.
All I need is to create an RPM out of this application and with this RPM I should be able to install the dependencies to another machine.
Things I have tried,
Created a setup.py file,
setup(
name='sample-package',
version='1.0.0.0',
author="Niranj Rajasekaran",
author_email="nrajasekaran#test.com",
package_dir={'': 'src/py'},
namespace_packages=['main'],
packages=find_packages('src/py/'),
install_requires=['Flask']
)
Ran this command
python setup.py bdist_rpm
Got two RPMs in dist/, one is noarch and other is src
I tried to install noarch rpm using this
yum install {generated-file}.rpm
I am able to get sample-package-1.0.0.0.egg file in site-packages but not flask.
Two questions,
Is my approach correct?
If so what is something that I am missing?
bdist_rpm lacks of a lot of functionality and IMO is not very well maintained. E.g. pyp2rpm is much better for converting existing PyPI modules. But your module does not seem to be on PyPI, so you need to specify it to bdist_rpm manually because it cannot retrieve this information from setup.py.
Run:
python setup.py bdist_rpm --requires python-flask
This will produce an rpm file which requires the python-flask package. For more recent RHEL/Fedora it would be python3-flask.
Newbie programmer here. This is a variation of this question and this question.
I am running Python 2.7 on Windows 7, and using git bash shell. I am trying to install the numpy package into a virtualenv directory in my work directory. I cannot install it using the $pip install -r requirements.txt or the $pip install numpy commands because of errors caused by its dependencies. Here is a log file for this install failure.
Although I can install numpy directly by downloading the executable binary (.exe) from sourceforge, but it forced me to install it in the c:/Python27/Lib/site-packages directory. I need to install it in my virtualenv work directory, e.g. c:/Users/MyName/Projects/myproject/myvirtualenv.
I need help on how to download the necessary numpy files into a temp directory, and how to use pip or another tool install it into my virtualenv directory.
I researched that I can choose a target directory using the -t option in pip, e.g., "pip install numpy --target=c:/Users/MyName/Projects/myproject/myvirtualenv". But I still can't get over the dependencies errors, so pip doesn't work for me unless I can figure out how to download the numpy files (including all dependencies) into a directory and then install from there.
Thanks for your help!
Preface
I am so new to ssh/unix protocols that I hope I don't offend anybody.
Context
I am using the cores at my university, and do not have root access. Thus, when I install python modules, I resort to the answer on these two related stack overflow posts:
1) How to install python modules without root access?
2) How to install python packages without root privileges?
In the second post, Col Panic highly recommends getting pip or easy_install on the cores, and if they are not already there, 'you should politely ask the admins to add it, explaining the benefit to them (they won't be bothered anymore by requests for individual packages)."
Following that piece of advice, I request that the admin put easy_install on all the cores. They did and after some proverbial futzing around with export, PATH and PYTHONPATH, I was able to get numpy and scipy on the cores and import them into iPython environment.
Unfortunately, there was some problems with matplotlib related to this question: ImportError: No module named backend_tkagg
I thought I could just ignore this problem related to SUSE by pickling everything and then plotting it on my laptop.
My Problem
I really do need NetworkX. I wrote down some notes on all the small intricacies that I used to install the other packages my last go, but failed this time around. Maybe I am forgetting something that I did last time?
nemo01.65$ easy_install --prefix=/u/walnut/h1/grad/cmarshak/xdrive/xpylocal networkx
TEST FAILED: /u/walnut/h1/grad/cmarshak/xdrive/xpylocal/lib/python3.3/site-packages does
NOT support .pth files
error: bad install directory or PYTHONPATH
You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from. The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/u/walnut/h1/grad/cmarshak/xdrive/xpylocal/lib/python3.3/site-packages
and your PYTHONPATH environment variable currently contains:
'/u/walnut/h1/grad/cmarshak/xdrive/xpylocal/lib/python2.7/site-packages'
Here are some of your options for correcting the problem:
* You can choose a different installation directory, i.e., one that is
on PYTHONPATH or supports .pth files
* You can add the installation directory to the PYTHONPATH environment
variable. (It must then also be on PYTHONPATH whenever you run
Python and want to use the package(s) you are installing.)
* You can set up the installation directory to support ".pth" files by
using one of the approaches described here:
https://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations
Please make the appropriate changes for your system and try again.
My Attemps to Fix This
I really do networkx otherwise I have to adjust a bunch of my code that I want to put on the clusters.
1) I typed in:
export PYTHONPATH=/u/walnut/h1/grad/cmarshak/xdrive/xpylocal/lib/python3.3/site-packages
into the bash environment. No luck...
2) I asked another grad for some help. He suggested I install pip via easy_install, which I did and then use:
pip install --user networkx
When I type in:
find ./local/lib/python2.7/site-packages/ | grep net
I get a ton of files that are all from the networkx library. Unfortunately, there is still some problems with dependencies.
THANK YOU IN ADVANCE FOR YOUR HELP. Really enjoy learning new things from your answers.
It looks like there are multiple versions of pip floating around (cf pip: dealing with multiple Python versions? ). Try installing pip using a specific version of easy_install. For example, this gave me a pip2.7
walnut.39$ easy_install-2.7 -U --user pip
Searching for pip
Reading https://pypi.python.org/simple/pip/
Best match: pip 1.5.6
Processing pip-1.5.6-py2.7.egg
pip 1.5.6 is already the active version in easy-install.pth
Installing pip script to /u/walnut/h1/grad/rcompton/.local/bin
Installing pip2.7 script to /u/walnut/h1/grad/rcompton/.local/bin
Installing pip2 script to /u/walnut/h1/grad/rcompton/.local/bin
Using /net/walnut/h1/grad/rcompton/.local/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip
walnut.40$
Then use pip2.7
walnut.40$ pip2.7 install --user networkx
Also, for non-root package installations, I've got the follow lines in my .bashrc:
export PYTHONPATH=$PYTHONPATH:$HOME/.local/lib/python2.7/site-packages
export PATH=$PATH:~/.local/bin
I have been for hours on this. I needed to get jpeglib and PIL reinstalled.
I installed jpeg lib from http://www.ijg.org/, please tell me if that's right.
I still have to reinstall PIL. I installed Fink, for apt-get, but still am not clear how to uninstall completely PIL before installing it.
And then installation, do i do apt-get install py-pil only? I see different instructions here and here. Which way should I go? I also can't figure out, does sudo python setup.py install reinstall python 2.6, or it just installs whichever thing i am in the directory of? However:
[petarpetrov#/Library/Python/2.6/site-packages/PIL]$ sudo python setup.py install
python: can't open file 'setup.py': [Errno 2] No such file or directory
thanks in advance
Don't muck about with fink. That uses a completely separate install of Python and all its dependencies. It really won't help with your actual problem.
Secondly, you're trying to run things from inside site-packages - this is wrong. Go back to the directory where you downloaded PIL (or download it again, if you don't still have it) and run sudo python setup.py install.
And no, it won't reinstall Python - it uses python to run the setup of the directory you're in.