I'm trying to install a pysnap library from github. This is part of the output I get. I have no idea how to proceed, any help would be greatly appreciated.
Installed /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pysnap-0.1.1-py2.7.egg
Processing dependencies for pysnap==0.1.1
Searching for cryptography>=1.2.2
Reading https://pypi.python.org/simple/cryptography/
Best match: cryptography 1.2.3
Downloading https://pypi.python.org/packages/source/c/cryptography/cryptography-1.2.3.tar.gz#md5=5474d2b3e8c7555a60852e48d2743f85
Processing cryptography-1.2.3.tar.gz
Writing /tmp/easy_install-7ZnmT5/cryptography-1.2.3/setup.cfg
Running cryptography-1.2.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-7ZnmT5/cryptography-1.2.3/egg-dist-tmp-rcoXcx
_configtest.c:1:1: error: thread-local storage is unsupported for the current target
__thread int some_threadlocal_variable_42;
1 error generated.
error: unable to create target: 'No available targets are compatible with this triple, see -version for the
available targets.'
1 error generated.
What platform are you trying to install pysnap?
I downloaded and installed pysnap sucessfully from this github location
I do have windows 10 platform and python 2.7 though. I dont' have a linux to replicate this issue.
If you are trying to install on Linux, depending on flavor and its setup , sometimes swap is setup as as /tmp and some applications are not able to write to /tmp. In your case it does looks like its trying to write to /tmp and erroring out.
Can you try pip install cryptography
and see if its able to install cryptography part without issues?
Once that dependency is out of way, you can install pysnap so that pysnap will not try to install cryptography
Related
I am working on a mixed Rust/Python project being build with maturin. I am having trouble figuring out how I can specify a pre-release version that can than be installed by pip.
The start of my Cargo.toml is
[package]
version = "0.0.1-test.1"
When I do maturin build --release, it creates my_project-0.0.1_test.1-cp39-cp39-macosx_10_7_x86_64.whl. Note that 0.0.1-test.1 in the version was changed to 0.0.1_test.1 in the name of the wheel file. (The dash became an underscore.)
If I publish this to my Nexus server and try to install it in a separate project, pip gives an error:
$ pip install my_project==0.0.1_test.1
Looking in indexes: ...
ERROR: Could not find a version that satisfies the requirement my_project==0.0.1_test.1 (from versions: 0.0.1-test.1, 0.0.1.dev1)
If I try it with a dash instead of an underscore:
pip install py_mod_query_builder==0.0.1-test.1
Looking in indexes: ...
ERROR: Exception:
<stack trace>
pip._vendor.packaging.version.InvalidVersion: Invalid version: '0.0.1-test.1'
If I change the version in Cargo.toml to 0.0.1_troy.1, then Cargo fails to parse the build file:
$ maturin build --release
🍹 Building a mixed python/rust project
💥 maturin failed
Caused by: Cargo metadata failed. Do you have cargo in your PATH?
Caused by: Error during execution of `cargo metadata`: error: failed to parse manifest at `/Users/me/my-project/Cargo.toml`
Caused by:
unexpected character '_' after patch version number for key `package.version`
I did have some success with pip install path/to/my_project*.whl. However, that is difficult to incorporate into building a docker image. The wheel is outside the project with the Dockerfile, so docker will not be able to find it without jumping through a bunch of hoops, while downloading it from the server during the docker build is simple, but fails due to the dash/underscore problem.
Additionally, while both projects are being developed, I would like the CI pipeline for the development branch to use the pre-release version. Getting access to the wheel file (without having pip download it) is nearly impossible in that situation.
It seems that Cargo insists on the format being #.#.#-string and pip insists on it being #.#.#_string. Is there a way to make both of them happy?
Versions:
Installing project
pip 22.1
python 3.9.12
Building project
pip 20.0.4
python 3.9.12
maturin 0.8.3
rustc 1.56.1 (59eed8a2a 2021-11-01)
Trying to install this Python IRC bot called Willie. This is what happens when I run setup.py:
C:\Python34\python.exe "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.5.1\helpers\pycharm\pycharm_setup_runner.py" C:\Users\Quibbles\Documents\willie-5.3.0\setup.py
Testing started at 1:35 PM ...
running pycharm_test
Searching for pygeoip
Best match: pygeoip 0.3.2
Processing pygeoip-0.3.2-py3.4.egg
Using c:\users\quibbles\documents\willie-5.3.0\.eggs\pygeoip-0.3.2-py3.4.egg
Searching for pyenchant
Best match: pyenchant 1.6.6
Processing pyenchant-1.6.6-py3.4-win32.egg
Using c:\users\quibbles\documents\willie-5.3.0\.eggs\pyenchant-1.6.6-py3.4-win32.egg
Searching for praw
Best match: praw 2.1.21
Processing praw-2.1.21-py3.4.egg
Using c:\users\quibbles\documents\willie-5.3.0\.eggs\praw-2.1.21-py3.4.egg
Searching for lxml
Reading https://pypi.python.org/simple/lxml/
Best match: lxml 3.4.4
Downloading https://pypi.python.org/packages/source/l/lxml/lxml-3.4.4.tar.gz#md5=a9a65972afc173ec7a39c585f4eea69c
Processing lxml-3.4.4.tar.gz
Writing C:\Users\Quibbles\AppData\Local\Temp\easy_install-p_x9naya\lxml-3.4.4\setup.cfg
Running lxml-3.4.4\setup.py -q bdist_egg --dist-dir C:\Users\Quibbles\AppData\Local\Temp\easy_install-p_x9naya\lxml-3.4.4\egg-dist-tmp-0expfysa
Building lxml version 3.4.4.
Building without Cython.
ERROR: b"'xslt-config' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n"
** make sure the development packages of libxml2 and libxslt are installed **
Using build configuration of libxslt
C:\Python34\lib\distutils\dist.py:260: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
cl : Command line warning D9025 : overriding '/W3' with '/w'
lxml.etree.c
C:\Users\Quibbles\AppData\Local\Temp\easy_install-p_x9naya\lxml-3.4.4\src\lxml\includes\etree_defs.h(14) : fatal error C1083: Cannot open include file: 'libxml/xmlversion.h': No such file or directory
error: Setup script exited with error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\BIN\\cl.exe' failed with exit status 2
Process finished with exit code 1
What am I doing wrong? I downloaded the source code from https://github.com/embolalia/willie/releases/tag/v5.3.0 and tried running setup.py in PyCharm.
It should be fairly obvious by the error messages:
** make sure the development packages of libxml2 and libxslt are installed **
You need to have the dev libxml2 and libxslt installed. It appears either you have the wrong versions perhaps, or don't have them installed properly.
I'L'I's answer gives you a hint of where to start searching next, but isn't a useful answer.
After several attempts on my own, I found that to get the lxml library installed, I needed to do the following:
First, download the lxml library from http://www.lfd.uci.edu/~gohlke/pythonlibs/
This is necessary because the PiPy archives (https://pypi.python.org/pypi/lxml/3.4.4) are way out of date, only giving you the option to install for Python 3.2 for the 3+ series, which of course is useless if you're on 3.4. There's also issues if you're using 64-bit. They may be sufficient if you're using 2.7, though.
Then use the instructions here: How do I install a Python package with a .whl file? to install the .whl file.
However that only fixes half the problem. The willie package appears to be broken in other ways (on Windows) because of trying to reference a unix-like /tmp directory (absolute path) instead of the proper Windows Temp directory.
This issue describes the problem, though no fix has yet been made: https://github.com/embolalia/willie/issues/811
It indicates that it's a Windows-specific bug in the installer. To work around that, download the .tar.gz from https://pypi.python.org/pypi/willie/5.3.0
Unpack it. Go to the willie-5.3.0\willie.egg-info directory, and edit the SOURCES.txt file. The fifth line is /tmp/tmpeAhjCF/willie. Delete that line.
Repackage the directory into a .tar.gz archive. Install via pip install .\willie-5.3.0.tar.gz.
Now it's installed, and you're ready for the next round of problems of actually getting it to run on Windows. Since I haven't actually succeeded in doing that yet, that's as far as I can help for right now.
I've looked through dozens of posts about this and nothing seems to work so I think I'm just missing something but I'm doing a beginners tutorial on making a website using python so I'm not totally sure what I'm doing wrong. I did
brew install mysql
and at the end of the install process I saw this: (I don't know if something was wrong at this point)
/usr/bin/install_name_tool: object: /usr/local/Cellar/mysql/5.6.20_1/lib/libmysqlclient.18.dylib malformed object (unknown load command 9)
/usr/bin/install_name_tool: object: /usr/local/Cellar/mysql/5.6.20_1/lib/libmysqlclient.18.dylib malformed object (unknown load command 9)
==> /usr/local/Cellar/mysql/5.6.20_1/bin/mysql_install_db --verbose --user=giancosta --basedir=/usr/local/Cellar/mysql/5.6.20_1 --datadir=/usr/local/var/
/usr/local/Cellar/mysql/5.6.20_1/bin/resolveip
Please configure the 'hostname' command to return a correct
hostname.
If you want to solve this at a later stage, restart this script
with the --force option
Warning: The post-install step did not complete successfully
You can try again using `brew postinstall mysql`
==> Summary
🍺 /usr/local/Cellar/mysql/5.6.20_1: 9579 files, 342M
Then I did
sudo easy_install mysql-python
which ended with: (again, I don't know if something was wrong at this point)
20 warnings generated.
ld: warning: ignoring file /usr/local/Cellar/mysql/5.6.20_1/lib/libmysqlclient_r.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
zip_safe flag not set; analyzing archive contents...
Adding MySQL-python 1.2.5 to easy-install.pth file
Installed /Library/Python/2.7/site-packages/MySQL_python-1.2.5-py2.7-macosx-10.8-intel.egg
Processing dependencies for mysql-python
Finished processing dependencies for mysql-python
Finally I ran:
mysqld
But I get:
dyld: Library not loaded: ##HOMEBREW_PREFIX##/opt/openssl/lib/libssl.1.0.0.dylib
Referenced from: /usr/local/bin/mysqld
Reason: image not found
Trace/BPT trap: 5
So looking at other posts I tried removing or uninstalling openssl and then reinstalling it. But that's not working. I don't know what to do at this point. I've even tried uninstalling mysql to start over using
sudo uninstall mysql
But that just gives me:
Preparing Uninstall...
Uninstall Began...
Uninstall Failed...
Reason: ErrorMissingBundle
I'm a beginner so I really don't know what to do/what's wrong at this point. Do I need to start over? If so, how? I've read posts that talk about links and OpenSSL messing things up, etc. but this is pretty foreign to me at this point. Any help would be greatly appreciated.
You should try using pip (A tool for installing and managing Python packages) to install it.
pip install MySQL-python
I have a problem using easy_install for matplotlib-venn. I'm on a windows computer using python2.7.
I'm suspecting the path is not correct but I do not know how to fix the problem.
Could anyone help me?
I'm attaching the output from trying to run the easy_install command in the CMD prompter.
C:\Python27\Scripts>easy_install matplotlib-venn
Searching for matplotlib-venn
Reading https://pypi.python.org/simple/matplotlib-venn/
Download error on https://pypi.python.org/simple/matplotlib-venn/: [Errno 11004]
getaddrinfo failed -- Some packages may not be found!
Couldn't find index page for 'matplotlib-venn' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [Errno 11004] getaddrinfo fai
led -- Some packages may not be found!
No local packages or download links found for matplotlib-venn
error: Could not find suitable distribution for Requirement.parse('matplotlib-ve
nn')
install for matplotlib-venn package
Output from trying the pip install suggestion:
C:\Python27\Scripts>easy_install pip
Searching for pip
Best match: pip 1.4.1
Adding pip 1.4.1 to easy-install.pth file
Installing pip-script.py script to C:\Python27\Scripts
Installing pip.exe script to C:\Python27\Scripts
Installing pip.exe.manifest script to C:\Python27\Scripts
Installing pip-2.7-script.py script to C:\Python27\Scripts
Installing pip-2.7.exe script to C:\Python27\Scripts
Installing pip-2.7.exe.manifest script to C:\Python27\Scripts
Using c:\python27\lib\site-packages
Processing dependencies for pip
Finished processing dependencies for pip
C:\Python27\Scripts>pip install matplotlib-venn
Downloading/unpacking matplotlib-venn
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement matplotlib-venn
Cleaning up...
No distributions at all found for matplotlib-venn
Storing complete log in C:\Users\jherman8\pip\pip.log
Based on
Download error on https://pypi.python.org/simple/matplotlib-venn/: [Errno 11004] getaddrinfo failed
and
Cannot fetch index base URL https://pypi.python.org/simple/
it seems that your have network issue. Do you run your machine behind a firewall or a proxy?
For easy_install to work behind proxy, you have to setup needed environments, for example
set http_proxy="user:password#server:port"
set https_proxy="user:password#server:port"
For pip you can use -proxy argument. More details on pip usage behind proxy see in this thread: How to use pip on windows behind an authenticating proxy
I think this is your solution
easy_install pip
pip install matplotlib-venn
No module matplotlib-venn in easy_install
And for future, use pip for install any package for python.
student#student-WIV68105-0080:~$ **sudo apt-cache search rtree**
libcneartree-dev - Library and headers for solving the Nearest Neighbor Problem
libcneartree5 - Library for solving the Nearest Neighbor Problem
student#student-WIV68105-0080:~$ **sudo apt-get install libcneartree-dev libcneartree5**
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libcvector2
The following NEW packages will be installed:
libcneartree-dev libcneartree5 libcvector2
For me the same error occurred for rtree package and I did the cache search and installed the liraries
In-case of cloudera box if you are trying then this will work as reaised in bugzile.
https://bugzilla.redhat.com/show_bug.cgi?id=1510444
It works for my cloudera vm jut follow the insteruction and then try to isntall by easy_install.
# easy_install -i https://pypi.python.org/simple stitches Searching for stitches Reading https://pypi.python.org/simple/stitches/ Best match: stitches 0.11 Downloading https://pypi.python.org/packages/9d/73/681005f0f0fb9483f0d94547a35059c776144fc998780b9ef00167a50f3d/stitches-0.11.tar.gz#md5=0ac0b6e418767e6ec5cf684460d1972f Processing stitches-0.11.tar.gz Running stitches-0.11/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ZMIU8w/stitches-0.11/egg-dist-tmp-82ctsZ zip_safe flag not set; analyzing archive contents... stitches.connection: module references file Adding stitches 0.11 to easy-install.pth file
Installed /usr/lib/python2.6/site-packages/stitches-0.11-py2.6.egg Processing dependencies for stitches ... ... Searching for pynacl>=1.0.1 Reading https://pypi.python.org/simple/pynacl/ Best match: PyNaCl 1.2.0 Downloading https://pypi.python.org/packages/fa/38/0f35ec4beb6562f1abfa07914db1cea978e93da409ba6293f810d9e677d6/PyNaCl-1.2.0.tar.gz#md5=7a31e95f5f457184b1660b71d6808b19 Processing PyNaCl-1.2.0.tar.gz Running PyNaCl-1.2.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-a0vNJS/PyNaCl-1.2.0/egg-dist-tmp-QYvAk9 Checking .pth file support in . /usr/bin/python -E -c pass Searching for cffi>=1.4.1 Reading http://pypi.python.org/simple/cffi/ Couldn't find index page for 'cffi' (maybe misspelled?) Scanning index of all packages (this may take a while) Reading http://pypi.python.org/simple/ No local packages or download links found for cffi>=1.4.1 error: Could not find suitable distribution for Requirement.parse('cffi>=1.4.1')
So the only solution is hacking the source code:
sed -i s,http://pypi.python.org,https://pypi.python.org, /usr/lib/python2.6/site-packages/setuptools/command/easy_install.py
sudo
I am following this awesome walk-through on how to install python.
I don't think I have a real problem as ...I think I'm able to work on my django project... however I ran into a couple errors that I just kind of skipped over and I was wondering where they are from.
Everything was going swimmingly until I got to the part where I install MySQL-python. I'm actually using MySQL through XAMPP instead... so if that's the problem let me know.
I tried installing MySQL-python v1.2.3 and got this error:
Processing MySQL-python-1.2.3.win-amd64-py2.7.exe
creating 'c:\users\quentin\appdata\local\temp\easy_install-reydf8\MySQL_python-1.2.3-py2.7-win32.egg' and adding 'c:\users\quentin\appdata\local\temp\easy_install-reydf8\MySQL_python-1.2.3-py2.7-win32.egg.tmp' to it
Moving MySQL_python-1.2.3-py2.7-win32.egg to c:\virtualenvs\django_tutorial\lib\site-packages
Adding MySQL-python 1.2.3 to easy-install.pth file
Installed c:\virtualenvs\django_tutorial\lib\site-packages\mysql_python-1.2.3-py2.7-win32.egg
Processing dependencies for MySQL-python==1.2.3
Searching for MySQL-python==1.2.3
Reading http://pypi.python.org/simple/MySQL-python/
Best match: MySQL-python 1.2.3
Downloading https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.3.tar.gz#md5=215eddb6d853f6f4be5b4afc4154292f
Processing MySQL-python-1.2.3.tar.gz
Running MySQL-python-1.2.3\setup.py -q bdist_egg --dist-dir c:\users\quentin\appdata\local\temp\easy_install-cnlqlk\MySQL-python-1.2.3\egg-dist-tmp-iaalng
error: The system cannot find the file specified
So normally I would expect that 1.2.3 did not install, but I think it did because this command works...
python manage.py syncdb
So I'm kind of curious what that error message about not finding the system file is from.
I also tried installing v1.2.4 and I get a similar error about finding another file:
(django_tutorial) C:\django_projects\insults>easy_install file://c:/users/quentin/downloads/mysql-python-1.2.4.win-amd64-py2.7.exe
Processing mysql-python-1.2.4.win-amd64-py2.7.exe
creating 'c:\users\quentin\appdata\local\temp\easy_install-hz3ivi\MySQL_python-1.2.4-py2.7-win32.egg' and adding 'c:\users\quentin\appdata\local\temp\easy_install-hz3ivi\MySQL_python-1.2.4-py2.7-win32.egg.tmp' to it
Moving MySQL_python-1.2.4-py2.7-win32.egg to c:\virtualenvs\django_tutorial\lib\site-packages
Removing mysql-python 1.2.3 from easy-install.pth file
Adding MySQL-python 1.2.4 to easy-install.pth file
Installed c:\virtualenvs\django_tutorial\lib\site-packages\mysql_python-1.2.4-py2.7-win32.egg
Processing dependencies for MySQL-python==1.2.4
Searching for MySQL-python==1.2.4
Reading http://pypi.python.org/simple/MySQL-python/
Best match: MySQL-python 1.2.4
Downloading https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python1.2.4.zip#md5=ddf2386daf10a97af115ffad2ed4a9a0
Processing MySQL-python-1.2.4.zip
Running MySQL-python-1.2.4\setup.py -q bdist_egg --dist-dir c:\users\quentin\appdata\local\temp\easy_install-v0_gfa\MySQL-python-1.2.4\egg-dist-tmp-2ltuob
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz
Extracting in c:\users\quentin\appdata\local\temp\easy_install-v0_gfa\MySQL-python-1.2.4\temp\tmpemj6wf
Now working in c:\users\quentin\appdata\local\temp\easy_install-v0_gfa\MySQL-python-1.2.4\temp\tmpemj6wf\distribute-0.6.28
Building a Distribute egg in c:\users\quentin\appdata\local\temp\easy_install-v0_gfa\MySQL-python-1.2.4
c:\users\quentin\appdata\local\temp\easy_install-v0_gfa\MySQL-python-1.2.4\distribute0.6.28-py2.7.egg
error: Setup script exited with error: Unable to find vcvarsall.bat
So yeah. Just kind of curious about those errors and whether or not I should be worried about them. I guess if things are working, I don't really have an problem but... others may also get confused about this and get stuck at the installation/setup part of working in django as well?
edit
ok it's not happy when I install 1.2.4, but if I just install 1.2.3 over it, syncdb works again.
MySQL-python 1.2.3/1.2.4
Django 1.5.1
XAMPP3.1.0, Apache2.4.3, MySQL5.5.32
Python 2.7.5 64-bit
Windows 7 64-bit
The main problem is here:
Setup script exited with error: Unable to find vcvarsall.bat
It means that your Cand C++ were not compiled. If you have installed Visual Studio 2012 recently, then follow my answer here, to find the solution to your problem.