I am trying to port a python desktop application which is currently based on python 2.7 to python 3.9. This application is using pyExcelerator 0.6.4a which worked fine in python 2.7 but in python 3.9 I got error:
File "C:\Python39\lib\site-packages\pyExcelerator\__init__.py", line 12, in <module>
from Workbook import Workbook
ModuleNotFoundError: No module named 'Workbook'
probably it is no compatible with python 3.9 (project itself seem a bit abandoned): anyone had same issue ?
Many thanks
Related
Since I updated Sphinx from 1.7 to 2.2.0 an attempt to create the documentation ends at once with
Could not import extension sphinx.builders.epub3 (exception: No module
named 'sphinxcontrib.serializinghtml')
I am starting Sphinx from pyCharm 2018.2 under Windows 7 Enterprise SP1 with Python 3.7. Environment variable "Path" contains the path to python 37, python 37/lib, python 37/lib/site-packages, python 37/dlls. The module serializinghtml exists in "Python 37\Lib\site-packages\sphinxcontrib\".
Can anybody help please?
Best regards
Humbalan
I am developing a small app in python using Kivy for the GUI. So far I have been working with Pycharm and 3.4.3 which works just fine. I have had to upgrade to 3.5.3 and now when I run the script it fails with the following error:
File "/usr/lib/python3/dist-packages/kivy/event.py", line 8, in <module>
import kivy._event
ImportError: No module named 'kivy._event'
Is this a python 3.5.3 kivy 1.9.1 compatibility problem?
I'm still learning python. I have windows 8 and had downloaded 2.7 as well as 3.5 because two modules I used in the past respectively used different python versions. Now though, I'm trying to run a script where the first line is import http.client or http. Neither of these work though. In cmd, python returns 3.5.1 currently and import http.client and import http return with no errors but in my IDE these don't work. Why not?
You can follow the Pycharm documentation here to change the Python version for your project from Python 2 to Python 3.
(In particular, Selecting Python interpreter for a project section)
I have Ubuntu Gnome 16.04 both python 2.7 and python 3.5 installed.
I have installed ggplot in python 3.5 but not able to import it.
I am getting ImportError: No module named 'StringIO'.
Am I missing something? As far as I know StringIO module has been merged in io module in python 3.5.
Found the issue, some files have not been fully converted for python3.
Open file /usr/local/lib/python3.5/dist-packages/ggplot/ggplot.py and change
import StringIO
to this
from io import StringIO
I am not getting any error now but there could be some other files where python2 codes needs to be converted to work in python3.
I have code like this:
import runpy
runpy.run_path('other.py', globals())
It works on my Windows Box with Python 3.2 but fails on the default Python3 installation (from the Repository) on my Ubuntu 10.10 machine with this message:
Traceback (most recent call last):
File "/home/markus/Documents/projects/BlenderSerialize/generate.py", line 2, in <module>
runpy.run_path('other.py', globals())
AttributeError: 'module' object has no attribute 'run_path'
I checked the documentation and it says that run_path was introduced in Python 2.7. What do I have to do to make this work?
It was introduced in Python 2.7 and 3.2. Hence it will not work with Python 3.0 or 3.1. To make it work, use Python 2.7 or 3.2.
When updating Python3 is not an option there is a workaround that allows one to execute a python script.
The following python code works quite well for me:
exec(compile(open("somefile.py").read(), "somefile.py", 'exec'), local_vars, global_vars)
Other examples can be found in What is an alternative to execfile in Python 3?