No module named 'charset_normalizer.md__mypyc' - pyinstaller

I'm using PyInstaller to compile a program and keep coming across the error "No module named 'charset_normalizer.md__mypyc.'" The Charset-Normalizer package is installed.
As a test, I tried re-compiling a program that I had previously created in early September without issue, but now receive the same error. I thought that maybe there is an issue with the versions of either PyInstaller or Charset-Normalizer so I've experimented with different versions, but cannot get it to work.

You are probably missing the "chardet" library
I installed it and it worked.
pip install chardet

I had the EXACT problem. Scripts that I was able to make into executables using Pyinstaller before I could no longer do so again. In my script I used the pdfplumber package, which when you install it also installs other packages like pillow, wand, charset-normalizer, etc.
Since the error was regarding charset-normalizer for me as well, I tried different versions of it. For me it was version 2.1.0 that made the executable work again. Install it with the "pip install charset-normalizer==2.1.0" command: https://pypi.org/project/charset-normalizer/2.1.0/.
If it does not work, go to "Release history" on that link and try another version. Try to remember when was the last time you created a working executable and get the version you think will work for you.

This worked for me:
I just added
from charset_normalizer import md__mypyc
to the top of my python script.
https://stackoverflow.com/a/58449206/20576777
If you don't have the charset-normalizer library installed, then you should install it using the following command:
pip install charset-normalizer

I got it to work by installing older versions of PyInstaller and Charest-Normalizer. Anytime this messages pops-up, consider installing an older version of the package.

Pyinstaller may sometimes miss your dependency. In such a case run pyinstaller with the --collect-all option.
In this case --collect-all charset_normalizer should force pyinstaller to include the dependency.

Related

OpenMDAO installation

I need openmdao on windows 8 to run an aerostructutal optimization code that uses it but I’m having issues in the installation process. I installed numpy and scipy through pip in the cmd and then also openmdao using pip install openmdao but when I try to run a .py with copied inside the code at the bottom of this page, I get an error about “Component” not being found to import. What am I doing wrong ?
Some codes are written for a specific version of OpenMDAO. If you are using OpenAeroStruct, it requires OpenMDAO 1.7.4, not OpenMDAO 2.2.x.
To obtain the correct version, you would need to use the command pip install openmdao==1.7.4 or to download and install the source directly from here: https://github.com/OpenMDAO/openmdao1, following the instructions on the README, not on readthedocs.

zlib/bz2 library and headers are requried for compiling R

Trying to compile R-3.3.2 on Debian Jessie, all dependencies are installed. However the ./configure script complains about the zlib/bzip2 library versions not matching with the minimum requirement.
Minimum version required:
zlib: 1.2.6 (installed version: 1.2.11)
bzip2: 1.0.6 (installed version: 1.0.6)
After looking at the parts of configure script checking the library versions, it seems that it compares versions with strcmp or strncmp. Since "1.2.11" is lexicographically smaller that "1.2.6" it return a non-zero value indicating that the match failed. Besides, it just compares the first 5 characters which is also not what it is intented. So, it's a bug in configure script. Changing the script fixed the issue.
For zlib, find this line:
exit(strncmp(ZLIB_VERSION, "1.2.5", 5) < 0);
Change it to:
exit(ZLIB_VERNUM < 0x1250);
I had some issues installing R myself, specifically with the error
checking for BZ2_bzlibVersion in -lbz2... no
I had to install libbz2-dev to get that error to go away.
Unfortunately, I came across a few more issues while running ./configure and had to do a little more digging to find out how to solve it.
Discussion on issue
After reading that, I had realized I had to install a couple packages like libcurl4-openssl-dev, libpcre3, and liblzma-dev to finally finish the configuration.
The cited link suggested
At this stage you could have as well tried to install R 3.2.0RC ...
R-devel has not yet diverged much.
Personally, I think that installing an older version to resolve dependency issues reeks of laziness, but that's just my two cents.

How do I install pyQt on MacOs, Python 3.5.1?

I already tried installing it with 'brew install pyqt' and the command did it's thing, but I still get an importing error.
You can try to follow this guide:
https://gist.github.com/guillaumevincent/10983814

Error Installing IJulia - Unknown Package

I installed the Anaconda package and then tried to install the IJulia package and I get:
As you can see Update didnt work either, which was the only possible instruction I could find upon a quick search...
Thanks.
There seems to be something wrong in your Julia installation.
The easiest thing to do (although a bit drastic) is probably to delete the .julia directory in your home directory and try again. The installed packages are stored in that directory, so deleting it will "reinitialise" the package manager.
Note also that it is no longer necessary to separately install Anaconda in order to use IJulia -- if it does not find a Jupyter installation, it will install the required packages itself.

How to import .ods?

I'm trying to import data (.ods file) and I know how to import .csv, .xls etc. but I strand all the time. I tried it with the package Gnumeric but R tells me that the required program 'ssconvert' cannot be found.
I wrote a package called readODS
which has a function read.ods that returns ods files as data.frames
(a list of data.frames, one per sheet)
It is available on CRAN, see here!
Source and bug reports here:
https://github.com/chainsawriot/readODS
I had the exact problem on Ubuntu Linux. It's frustratingly obvious:
sudo apt-get install gnumeric
As it happens, I had a bunch of obsolete packages, and went thru a bunch to update them. The gnumeric library requires the XML library, and my installation of XML library was built on 2.14, and my R wouldn't load anything built before 3.0. I don't think that is your issue, but if this solution above doesn't work, maybe you could also check that your packages are up-to-date. Anything I installed via sudo had to be removed via sudo, or I got permissions errors.
It's frustratingly obvious, because the error message is
Error in read.gnumeric.sheet(file = fname, head = TRUE, sheet.name = "Sheet1") :
Required program 'ssconvert' not found.
To emphasize it, the package documentation at http://cran.at.r-project.org/web/packages/gnumeric/gnumeric.pdf says
Requires an external program, 'ssconvert' (normally installed with 'gnumeric' (http://projects.gnome.org/gnumeric/) in 'PATH'.
How do you get ssconvert? Again, frustratingly obvious: it's normally installed with gnumeric. Go to the command line, and type ssconvert, and it'll remind you that:
user#Computer:~$ ssconvert
The program 'ssconvert' is currently not installed. You can install it by typing:
sudo apt-get install gnumeric
I checked, ssconvert isn't in the dependency packages (like gnumeric-common), it's in gnumeric proper, so you have to install the complete gnumeric package:
sudo apt-get install gnumeric
I haven't tried it but the ROpenOffice package looks like it might do the job: http://www.omegahat.org/ROpenOffice/

Resources