Trying to determine which numpy package is compatible with my python environment. My server has no internet access, so I need to download and install the package locally.
I know the cp27 refers to Python 2.7, but what is the difference between these two packages:
numpy-1.12.0rc1-cp27-cp27m-manylinux1_x86_64.whl
numpy-1.12.0rc1-cp27-cp27mu-manylinux1_x86_64.whl
The differing part is an ABI tag.
mu indicates --enable-unicode=ucs4
m on its own is --enable-unicode=ucs2
See UCS-2 vs UCS-4 builds; to determine which you need for your current installation, see How to find out if Python is compiled with UCS-2 or UCS-4?
Related
I have made an environment based on ArcGIS Pro, which has
Python 3.7.10,
arcpy 2.8,
arcgispro 2.8,
gdal 2.3.3
I need to use georasters, but I do not know which version to install. I tried installing the default and now I have, georaster 0.5.15. However, whenever I import the library, I end up getting
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
I searched it online wherein they suggested to upgrade numpy, but when I did that, the whole environments stopped working. What should I do? I am planning to downgrade numpy and georasters, but I do know which version to use.
I've written a program on the python version 3.5.2, because i need a 64 bit version of python for my tensorflow-gpu library.
Its also possible to use the normal tensorflow library, which doese'nt require a 64 bit python, but in my case i wanted to use my gpu.
My question is: If some users have a higher version installed (of python) and use the normal tensorflow library, will they still be able to execute it?
Fabian
It all depends on what code you used, and if the syntax was changed in later versions. For example, if your version of Python uses print "Hello World!" and the user's version is print("Hello World"), then you would have to change it to the later versions specification.
I installed Jython 2.7.1 and want to get librosa to work to get theier mfcc transformations to work. I have issues installing it as it seems to rely on numpy which uses C but Jpython does not do C. I found JyNi as some layer in-between to get this to work. Is there any installation guidance that i could get? (for mac osx)
Regards
I have installed virtualenvwrapper in a 3.5.0b1 virtualenv, called setupenv, to be able to generate new python 3.5 test environments easily.
Looking over the list of installed packages, I did see argparse version 1.3.0 installed. This (latest) version of argparse has not been tested with 3.5.
Is this dangerous?
As far as I know 3.2+ comes with its own argparse. Could this install break other packages relying on argparse? Why is this installed at all?
This is probably not dangerous. If you run:
python3.5 -c "import argparse; print(argparse.__file__)"
, you can see that the arparse.py installed with the interpreter takes precedence over the superfluously installed argparse package.
A bit of digging (or using the pipdeptree package) will show you that stevedore is dependent on argparse. This is just sloppy programming (or disregard of possible bandwidth issues).
In a package's setup.py you can easily test if you are running python < 2.7 or 3.0 <= python < 3.2 and only install argparse for those cases.
I would just de-install argparse from your setupenv virtualenv (pip uninstall argparse -y), virtualenvwrapper is not affected by the removal in my experience.
This is actually a bug in stevedore, it uses the pbr package and that supports specification of the python version using environment markers
but stevedore is not using that. The irony is that the example for this in pbr is with argparse, by specifying in the requirements.txt:
argparse; python=='2.6'
A bug report against stevedore was filed, but although the fix was trivial, it was not implemented for several releases. Finally the issue was
set to won't fix, probably because dropped support for 2.6 removed the
need for argparse altogether.
My department has version < 1.4 version numpy isntalled in /usr/lib/somewhere/numpy. Since I don't have the permission to replace it with a new version. I installed numpy 1.5 in my home directory. However, later when I install scipy, it complained that the version in /usr/lib/somewhere/numpy has version < 1.4. How can I solve this problem?
Change sys.path so that your numpy directory comes in front of the global numpy directory.
That way your version should be imported instead of the other version. If you really want to make sure that the other version isn't used than you can use virtualenv to get your own private environment with all of your own libraries.
You should use virtualenv to create an environment isolated from system packages with the --no-site-packages option to avoid any conflicts with your system packages. You can then install numpy with pip or easy_install specifying the version you want. There are many tutorials out there about how to use virtualenv.