How to properly update xlwings - xlwings

After xlwings is updated from 0.6 to 0.7.0, I have the following problem.
Although xlwings works, when I click Import Python UDFs, I get an error that tells:
Run-time error '1004' Cannot run the macro...
The macro may not be available in this workbook or all macros may be disabled.
Xlwings web site only tells about installation of the package. I could not see steps for upgrading the package.
What is the proper way of upgrading xlwings? What should be the steps for the upgrade?

The python package itself is updated like every other package (pip install --upgrade xlwings or conda upgrade xlwings).
Updating the Excel add-in is explained here, the easiest way is to run xlwings addin update.
However, this expects that you have also installed the add-in previously with xlwings addin install. If not, you could also update it manually by replacing your current version (wherever that is saved) with the latest version that is in the xlwings package (run >>> import xlwings, >>> xlwings.__path__ to see where the xlwings package has been installed).
By the way, I assume you're facing this issue that had been fixed with v0.6.4

you must install and upgrade the version before to install addin, dont works if you do not upgrade

Related

xlwings v0.20.4 installed instead of v0.20.5

I'm attempting to install the latest version of xlwings v0.20.5 (released 8/27/2020) on a Windows 10 machine.
After running the following two commands at the Anaconda prompt,
conda install xlwings
xlwings addin install
v0.20.4 is instead installed.
Is v0.20.5 available via conda or is the xlwings website mistaken when it states that v0.20.5 is the latest available version?

RHEL 7 installing tkinter with python 2.7

I've disabled the subscription manager and registered a few repos, epel and remi, but am unable to install tkinter. Keep getting the error no package available. The only package available is for python 3.4. Was wondering whether anyone else had run into this issue. Not sure how to resolve it there's not a lot of documentation on the RHEL website.
I've also tried installing tcl/tk and yum can't seem to find these packages either. The one package with tcl in it it fails because of dependency problems. No luck with yum groupinstall -y "development tools" either. I'm mostly just trying to install pyautogui which requires tkinter be installed already.
The tkinter package is in the rhel-7-server-optional-rpms repo, though I don't see pyautogui available in RHEL.
Your mileage may vary on whether tkinter is at the right version needed.

How to install difflib module in python 2.7 windows 10

Currently, I am facing difficulty installing difflib module in python 2.7 version in windows 10 system.
I want it to perform some text analytics analysis
tried using
apt-get install npm
npm install difflib
and
pip.exe install difflib
Solution for me was to save the difflib.py in the location where your .py file resides and then import it in your file.
install using pip should be a great idea, You can refer to the module related details here:
https://docs.python.org/2.7/library/difflib.html
If you face an issue installing it using pip, then the next way is to get the difflib.py from any working machine and keep it in the project directory itself, so that just importing the module itself will work.
This is the codebase reference from svn of python itself:
https://svn.python.org/projects/python/trunk/Lib/difflib.py

Installing tensorflow on Pycharm (Mac)

I was trying to use tensorflow in Pycharm IDE.
It seems that in Pycharm, it is one-click to install a package. It was very easy with bumpy. Now error occurs when I was trying to install tensorflow.
Tensorflow was installed through terminal on Mac, as screenshot shows, using the command
sudo pip install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.8.0-py2-none-any.whl
(Refer to https://www.tensorflow.org/versions/r0.8/get_started/os_setup.html#pip-installation)
Any suggestions ? Thanks.
If you install tensorflow with the virtualenv option and want to use it from Pycharm for a project, you need to set up a corresponding virtualenv interpreter. There are a few solutions on the forum, for example How to get VirtualEnv TensorFlow to work in PyCharm?, however, that one didn't work for me with a "python packaging tools not found pycharm" error.
This is a working solution for me, first create a virtualenv from Pycharm and then install tensorflow there:
In Pycharm, Preferences -> Project interpreter -> Create VirtualEnv -> give the virtualenv a name and location of your choice, and select "inherit global site-packages" option -> OK.
In command line, install tensorflow in the virtualenv location you created in Step 1. For the above case, the location is ~/tensorflow_pycharm, therefore, run command virtualenv --system-site-packages ~/tensorflow_pycharm
In Pycharm, select the created project interpreter, and select the tensorflow package, double click to install the package.
If Step 3 is successful, set run configuration, and try run a sample program.
Update - Nov. 1, 2017:
Tried successfully with Latest Jetbrain PyCharm Community Edition (2017.2.4) and Python 2.7.14, with Installing with virtualenv of https://www.tensorflow.org/install/install_mac.
Install tensorflow with virtualenv
Add Local to Project Interpreter.
Run the script
Generate graph
Run tensorboard --logdir=/tmp/tensorflow_logs in Terminal of PyCharm
Go Preferences and search for the interpreter. You may see several interpreters. Select any interpreter which has the tensorflow package installed.
Check out the installed packages and double check the versions of tensorflow as shown in this picture.
To summarize (on Mac) :
Step 1, get latest Python (2.7.11 today) on Pycharm:
Pycharm, can not find Python version 2.7.11
Step 2, follow "Pip Installation" of https://www.tensorflow.org/versions/r0.8/get_started/os_setup.html#download-and-setup
Step 3, Pycharm-- preference -- project interpreter, install the latest versions of numpy, protobuf, six.
Tensorflow import error on Pycharm (Mac)
Note, maybe have to click the "specify version" when installing.
Step 4, Pycharm-- preference -- project interpreter, install the latest version of tensorflow (v 0.8.0 today).
Note, if not find v0.8.0, then maybe have to manually click "Manage Repositories" and then add the link of Step 2 (https://storage.googleapis.com/tensorflow/mac/tensorflow-0.8.0-py2-none-any.whl)
These steps worked well on both Mac computers of mine. Thanks for all helps during the procedure from contributors.
Steps I followed
1. Use the virtualenv option in tensor flow's official guide for installation and follow the steps exactly to install and set up tensor flow. Although we've already created a virtual environment here, I created a separate one for Pycharm projects.
This is how you do it.
1. Create a new project. Go to Preferences. Go to interpreter and create a new virtualEnv. Give it a name and check on the box "inherit global site-packages". Press "OK".
creating a virtualenv
Below are a list of Packages. Here's where I couldn't find tensor flow initially. If this is the case, there's a + symbol on the bottom left. Click on it and manually search for "tensorflow". Click on "install package" on the bottom left.
installing tensorflow package
After the installation is done press OK.Close this screen. Tensorflow will now appear on the installed packages list.
Press ok. Now test your installation with a program.
import tensorflow as tf
hello = tf.constant("hello TF")
sess = tf.Session()
print(sess.run(hello))
Hope this helps.

Fail to install Python 2.7.9 on a Windows google compute engine instance

I fired up a new Windows google compute engine instance. It's running Windows 2008 R2, service pack 1.
I download and try running the Python .msi installer for version 2.7.9, and it fails with this error:
There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor.
I see this error for both the 64-bit and the 32-bit installer.
Has anyone else seen it or know of a work-around?
I reproduced your issue and I found two workarounds:
You can install python 2.7.6 successfully without further action.
If you need python 2.7.9 you can install it deselecting pip from the install menu.
This seems to be related to this answer in another thread although in that case the issue is with version 3.4.
Install python EXCEPT "pip"
Run the python install msi again and select "change"
Select "pip" and install the pip
It would be works...
I think it is a priority problem into the msi package...the package seems to try to install the pip before installing python.exe. So, pip can not be installed...
I'm using Windows 8.1 64-bit. I had 2.7.11 installed and then I tried to install PIP as well via Chocolatey PIP package.
I think my installation had got messed up because I had tried to install Python 3.4 as well as Python 2.
Then I had deleted all the Python 2 and Python 3 files in an attempt to get rid of this.
What worked for me was:
Editing the Environment Variables both, System and User to remove any PYTHONHOME or PYTHONPATH variables
I also deleted the path I had to python2 in the PATH environment variable
Now (as mentioned in Python Issue 22329) after deleting the Environment variables you can go into 'Programs and Features', click on the Python 2.7.11 (64-bit) program and then click 'Repair' - this then worked as I would expect without error.
Now finally I was able to go into 'Programs and Features', click on the Python 2.7.11 (64-bit) program and then click 'Uninstall'.
Edit: I assume this is connected with this PYTHON_HOME answer to a problem with Python 3.4
It seems to be a dependency issue, please try to install "Microsoft Visual C++ 2008 SP1 Redistributable Package (x64)"