So I am trying to install pyRXP on my os x machine (using anaconda).
If I use pip, import pyRXP doesn't work,
I have also tried to install by cloning https://bitbucket.org/rptlab/pyrxp
and running the setup.py file
It claims I need to compile something if I am not on windows, but I can't work out what, where that source is.
Sorry I am kind of new to python, and this has become very confusing, no amount of googling is helping.
Cheers for any help.
In newer versions of pyRXP, the module seems to have been renamed to pyRXPU. Something about supporting Unicode.
It seems that pyRXP (which supported 8 bit characters) has been removed and only pyRXPU (supporting 16 bit unicode characters) is in the package now, although the documentation still suggests you can import pyRXP! I've submitted an issue about this.
The only solution, if using the latest version of pyRXP (as suggested by the previous answer), is to instead do:
import pyRXPU
Update: The documentation, and README file in the repository, have now been fixed to only reference import pyRXPU and no longer use import pyRXP.
Related
I try to inititialize HDBSCAN for clustering in JupytherLab. I use Python 3.7.6..
import numpy as np
import pandas as pd
from sklearn.datasets import load_digits
from sklearn.manifold import TSNE
import hdbscan
There always always appears the same error (see headline) and until now I do not know, from what exactly it comes from.
I have looked in several post after solutions, but no solution has helped me until yet.
For example:
uninstalled and installed numpy.
installed numpy >= 1.20.0
tried lines like pip install package --no-cache-dir --no-binary :all:
tried following package version combination: hdbscan=0.8.19, matplotlib=3.2.2, numpy=1.15.4, pandas=0.23.4, scikit-learn=0.20.1, scipy=1.1.0, tensorflow=1.13.1.
I have also tried to install packages like tensorboard, but it did not helped. Everything is installed via the Terminal and with pip.
I start to think, that the problem might be deeper - but maybe I overlooked something important.
Can somebody help me to find the bug, please?
Best regards
Philipp
I guess you've probably seen this very long HDBSCAN GitHub issue where there still doesn't seem to be a clear solution. Unfortunately it seems to affect different systems in weird ways and there is a huge list of possible solutions and things that worked for other people (personally, just reinstalling numpy worked for me when I had a similar problem last week.)
The fact that you can try so many things and still have it not work seems suspicious. Maybe something else about your Python install or the way you're trying them is affecting the solutions? For instance, is JupyterLab definitely using the same Python environment that you're trying these solutions on? (You could test this by uninstalling HDBSCAN and seeing if the error changes instead to "package not found.")
Other than the many solutions in the GitHub issue (which it sounds like you've already tried), I really don't think there's much else you can try other than freshly reinstalling Python. Something about NumPy 1.20 and a change to the C API is causing this issue and it could be that something is lurking in your install every time you try these solutions.
Alternatively, you could make a new Python install/environment with a tool like pyenv or anaconda so that it doesn't break your existing install, and you can try and install just the bare minimum on this new install (i.e. just HDBSCAN.)
Upgrading the numpy library solved the problem.
My numpy version is 1.22.0 and sklearn version is 0.24.1.
you should also look here: ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject
I'm using Python.NET to create wrapper for iText.net (https://github.com/itext/itext7-dotnet).
The dll is named itext.kernel.dll and the python script is in the samne folder of all the itext dlls.
With Jetbrain dotPeek I see that itext.kernel has various namespaces; the namespace iText.Kernel.Pdf is what I need, in particular the public class PdfReader.
Here's what I'm doing (from the docs on https://pythonnet.github.io/):
import clr
clr.AddReference('itext.kernel')
sys.path.append(os.getcwd()) # the script is currently in the dll folder
from iText.Kernel.Pdf import PdfReader
But this gets me a "ModuleNotFoundError: No module named 'iText'" error.
I can't understand what it's wrong, can someone point me to the right direction? Thanks.
edit: I can import and use iTextSharp just fine, it seems iText7 has something different.
Well, long story short I really wanted this to work... and solved my issue!
I tried using older builds, and I found out that build 7.0.8 worked fine.
I compared it with build 7.1.11 (the one I was having problems with) using dotPeek, and noticed it has some references, namely BouncyCastle.Crypto, Common.Logging and Common.Logging.Core.
I did put them in the project folder, but still no dice... until I noticed I was using BouncyCastle.Crypto build 1.8.6, while the itext.kernel referred build 1.8.5! Replacing with that version solved the issue.
Basically the newer builds of iText7 have 3 referenced libs, that must be present in the exact same version (at least to be imoported by pythonnet).
I hope this can help someone that has issues similar to mine.
trying to import scipy.interpolate but it can’t import _fblas.pyd. It keeps throwing the following error
File "C:\cygwin64\lib\python2.7\site-packages\scipy/linalg/blas.py", line 155, in <module>
from scipy.linalg import _fblas
ImportError: cannot import name _fblas
My online research suggested that this is because I had the wrong version of numpy installed, and I need to install numpy+mkl. So I uninstalled the version I had and pip installed numpy 1.10.4, which includes mkl.
This did not fix the original problem with _flbas.pyd.
I would reinstall scipy but I can't remember where I got the version I have, and when I pip install scipy 0.17.1.tar.gz it throws an error saying that it has no blas resources, which are necessary. I've also tried to download it from here: https://github.com/scipy/scipy/releases, but they don't include _fblas.pyd in the first place.
I’m not sure where to go from here. I'm not even entirely sure why it won't import the _fblas.pyd file.
This looks like you tried to manually comply to your needed packages. Even though I take my hat off at your effort, keep in mind that this is not an simple task at all.
I might also add that this kind of work is not meant for a developer ("the person who writes the code"), but a full time maintainer. Specially with your particular Cygwin environment
So, what can you do? Alternatively, you can use one of Continuum's mkl-ready python-and-many-tools-including-mkl+scipy distribution or Enthought's Canopy. Hopefully, this will avoid you lots of hours of staring at the screen wondering what's wrong
I am a programming novice, so apologize in advance if I'm asking a dumb question or perpetrating some site etiquette violation. I have tried very hard to research the answer to my question on an issue that seems to be very common, but none of the proposed solutions have worked, so am looking for some help as I just don't know what to try next.
I'm trying to import Panda from iPython onto Windows 8. I have version 2.7 of Python and have successfully downloaded Numpy. Given the suggestions on this site, I have downloaded all the file that I think Panda is dependent on (pytx, dateutil, setuptools), but it still didn't work: the error message includes:
Import Error Traceback (most recent call)
<ipython-input-2-d6ac987968b6> in <module>()
try
from.import hashtable, tslib, lib
except exception: # pragma: no cover
import datetime
- C: \Python27\lib\site-packages\pandas\__init__.py in <module>():
Import Error: No module named six
Out of desperation, I also deleted all previous version of pandas and loaded Aneconda, thinking from previous responses that might help capture all required modules including Pandas, but the same error keeps coming up.
Any help would be much appreciated, and don't worry about pointing out the obvious (since it's clearly not obvious to me.)
The easiest way to get modules up and running on Windows is to use Christoph Gohlke's Python Extension Packages for Windows repository. It includes installers for a ton of (mainly scientific-related) modules, including pandas, matplotlib, six, etc. Since many modules included compiled extensions, installing using pip doesn't always work if the package maintainer hasn't published a binary for your package of interest. Gohlke's packages include everything already pre-compiled, you just need to choose the version and bit-ness of Python, and download the .exe files.
I am using Python 2.6.1 and I want to connect to MySQLdb, I installed mySQL in my system, and I am trying to connect MySQL-python-1.2.2.win32-py2.6 from http://www.codegood.com/archives/4 site but its not working
while running my application its saying that No module named MySQLdb
please any one provide me the proper setup for MySQLdb.
thanks in advance
The best setup for Windows that I've found:
http://www.codegood.com/downloads?dl_cat=2
EDIT: Removed original link (it's an ad farm now :( )
The module is not likely in your python search path..
Check to see if that module is in your Python Path... In windows...you may find it in the registry
HKLM\Software\Python\PythonCore\2.6\PythonPath
Be careful editing it...
You may also alter the Python Path programmaticly by the following
import sys
sys.path.append('somepath_to_the_module_you_wanted')
import the_module_you_wanted
Hope that helps
I was having this problem and then I realised I was importing MySQLdb erroneously - it's case sensitive:
Incorrect: >>>import mysqldb
Correct: >>>import MySQLdb
Silly mistake, but cost me a few hours!
generally, (good) python modules provide a 'setup.py' script that takes care of things like proper installation (google for 'distutils python'). MySQLdb is a "good" module in this sense.
since you're using windows, things might be a bit more complex. I assume you already installed MySQLdb following the instructions and it still gives this problem. what I would do is open a cmd.exe window, cd to the directory containing the 'setup.py' script and there type something like
C:\Python26\Python.exe setup.py install
if this does not work, then grab the module somewhere else, maybe at the place where it is actively developed: http://sourceforge.net/projects/mysql-python/
See this post on the mysql-python blog: MySQL-python-1.2.3 beta 2 released - dated March 2009. Looks like MySQLdb for Python 2.6 is still a work in progress...
I went for compiled binary , thats the best way to go on windows. There is a good source maintained by someone.
I wrote about it here before because some months down the lane I will forget how I solved this and be searching Stack again :/
http://vangel.3ezy.com/archives/101-Python-2.4-2.5-2.6-and-2.7-Windows-MySQLdb-python-installation.html