I am trying to install pyside with Python 3.8. It is stating that I need Python [(2, 6), (2, 7), (3, 2), (3, 3), (3, 4)]. Is there a way I can force install and override this requirement?
Related
AttributeError: module 'pysynth' has no attribute 'make_wav'
import pysynth as ps
test = (('c', 4), ('e', 4), ('g', 4), ('c5', -2), ('e6', 8), ('d#6', 2))
ps.make_wav(test, fn = "test.wav")
pip version pysynth of pysynth is outdated. If you installed pysynth through pip, uninstall it, and install from github repository.
pip uninstall pysynth
git clone https://github.com/mdoege/PySynth.git
cd PySynth
python3 setup.py install
It is my understanding that NumPy dropped support for using the Accelerate BLAS and LAPACK at version 1.20.0. According to the release notes for NumPy 1.21.1, these bugs have been resolved and building NumPy from source using the Accelerate framework on MacOS >= 11.3 is now possible again: https://numpy.org/doc/stable/release/1.21.0-notes.html, but I cannot find any documentation on how to do so. This seems like it would be an interesting thing to try and do because the Accelerate framework is supposed to be highly-optimized for M-series processors. I imagine the process is something like this:
Download numpy source code folder and navigate to this folder.
Make a site.cfg file that looks something like:
[DEFAULT]
library_dirs = /some/directory/
include_dirs = /some/other/directory/
[accelerate]
libraries = Accelerate, vecLib
Run python setup.py build
The problem is I do not know 1. what the variables library_dirs and include_dirs should be so that NumPy knows to use Accelerate BLAS and LAPACK and 2. if there are any other additional steps that need to be taken. If anyone knows how to do this or can provide any insight, it would be greatly appreciated.
I actually attempted this earlier today and these are the steps I used:
In the site.cfg file, put
[accelerate]
libraries = Accelerate, vecLib
Build with NPY_LAPACK_ORDER=accelerate python3 setup.py build
Install with pip3 install .
Afterwards, np.show_config() returned the following
blas_mkl_info:
NOT AVAILABLE
blis_info:
NOT AVAILABLE
openblas_info:
NOT AVAILABLE
accelerate_info:
extra_compile_args = ['-I/System/Library/Frameworks/vecLib.framework/Headers']
extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)]
blas_opt_info:
extra_compile_args = ['-I/System/Library/Frameworks/vecLib.framework/Headers']
extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)]
lapack_mkl_info:
NOT AVAILABLE
openblas_lapack_info:
NOT AVAILABLE
openblas_clapack_info:
NOT AVAILABLE
flame_info:
NOT AVAILABLE
lapack_opt_info:
extra_compile_args = ['-I/System/Library/Frameworks/vecLib.framework/Headers']
extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)]
Supported SIMD extensions in this NumPy install:
baseline = NEON,NEON_FP16,NEON_VFPV4,ASIMD
found = ASIMDHP,ASIMDDP
not found =
and my quick test suggest significant performance boost relative to OpenBlas.
No it doesn't have to be that complicated. I used these two commands and was able to install numpy with Apple Accelerate on Mac M1.
pip install cython pybind11
pip install --no-binary :all: --no-use-pep517 numpy
Reference: How to install SciPy on Apple Silicon (ARM / M1)
I'm running a Python script on a Jupyter notebook on Linux Mint.
The code is hardly important but here it is (it's a tutorial for graphframes):
import pandas
import pyspark
from functools import reduce
from graphframes import *
from IPython.display import display, HTML
from pyspark.context import SparkContext
from pyspark.sql import SQLContext
from pyspark.sql.functions import col, lit, when
from pyspark.sql.session import SparkSession
sc = SparkContext.getOrCreate()
sqlContext = SQLContext.getOrCreate(sc)
spark = SparkSession(sc)
vertices = sqlContext.createDataFrame(
[
("a", "Alice", 34),
("b", "Bob", 36),
("c", "Charlie", 30),
("d", "David", 29),
("e", "Esther", 32),
("f", "Fanny", 36),
("g", "Gabby", 60),
],
["id", "name", "age"],
)
edges = sqlContext.createDataFrame(
[
("a", "b", "friend"),
("b", "c", "follow"),
("c", "b", "follow"),
("f", "c", "follow"),
("e", "f", "follow"),
("e", "d", "friend"),
("d", "a", "friend"),
("a", "e", "friend"),
],
["src", "dst", "relationship"],
)
g = GraphFrame(vertices, edges)
display(g.inDegrees.toPandas())
The last line is the line causing trouble, it gives the following error:
Exception: Python in worker has different version 2.7 than that in driver 3.6, PySpark cannot run with different minor versions.Please check environment variables PYSPARK_PYTHON and PYSPARK_DRIVER_PYTHON are correctly set.
These two variables are correctly set:
printenv PYSPARK_PYTHON
-> /usr/bin/python3
printenv PYSPARK_DRIVER_PYTHON
-> /usr/bin/python3
I also added them to my spark-env.sh file as so:
# This file is sourced when running various Spark programs.
# Copy it as spark-env.sh and edit that to configure Spark for your site.
export PYSPARK_PYTHON=/usr/bin/python3
export PYSPARK_DRIVER_PYTHON=/usr/bin/python3
But the error persists, where else could I have to update these variables?
Edits
python --version
Python 3.7.4
pip3 list | grep jupyter
jupyter 1.0.0
jupyter-client 5.3.4
jupyter-console 6.0.0
jupyter-core 4.6.1
jupyterlab 1.1.4
jupyterlab-server 1.0.6
pip3 list | grep pyspark
pyspark 2.4.4
The problem is more likely conflicting versions of python. Set PYSPARK_PYTHON and PYSPARK_DRIVER_PYTHON to /usr/bin/python.
Alternatively you can use venv
cd ~
python3 -m venv spark_test
cd spark_test
source ./bin/activate
pip3 install jupyterlab pyspark graphframes
jupyter notebook
You must put the jupyter file inside your newly created folder.
This question already has an answer here:
Installing PySide for Python3
(1 answer)
Closed 4 years ago.
I followed the steps to install Pyside on my macOS 13.13.4 on Python 3.6.4 on this Github page but after runninng pip install -U PySide, I got the following error message which seems to indicate that Pyside is not compatible to Python 3.6.4 ??:
mymacs-MacBook-Pro:~ mymac$ pip install -U PySide
Collecting PySide
Using cached https://files.pythonhosted.org/packages/36/ac/ca31db6f2225844d37a41b10615c3d371587677efd074db29855e7035de6/PySide-1.2.4.tar.gz
Complete output from command python setup.py egg_info:
only these python versions are supported: [(2, 6), (2, 7), (3, 2), (3, 3), (3, 4)]
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/jq/yyp9q2fs1z5780k9l1_2ph4r0000gn/T/pip-install-zz9h16bx/PySide/
mymacs-MacBook-Pro:~ mymac$
Is I have anaconda, I looked at this website and this stackoverflow page I tried conda install -c anaconda pyside and conda install -c conda-forge pyside but both of them also threw this same error message:
Solving environment: failed
UnsatisfiableError: The following specifications were found to be in conflict:
- pyqt
- pyside
Use "conda info <package>" to see the dependencies for each package.
Many thanks in advance for your help!
It seems according to stackoverflow page that Pyside will not be updated for version of python 3.5+. Instead, Pyside2 should be installed. The Installation instructions can be found here
noob programmer here, I'm trying to get the SQLite3 on my Python installation up-to-date (I currently have version 3.6.11, whereas I need at least version 3.6.19, as that is the first version that supports foreign keys). Here's my problem, though: I have no idea how to do this. I know next to nothing about the command line, and I don't really know what files to replace (if at all) in my python install. And before anyone asks, I'm already using the latest Pysql version – it's what's not up to date. Can anyone give me some pointers, or maybe a guide on how to update this?
I'm on Mac OSX 10.5.8, working with python 2.6.
I suggest using the 'pip' command on the command line.
pip search sqlite
pip install pysqlite
I just came fresh from installing this both in Mavericks and Mountain Lion.
This SO article mentions using the build_static method, which they say retrieves that latest version of the sqlite amalgamation. For some reason it didn't work (ie it didn't seem to download it or use it)
What I ended up doing was
Downloaded pysqlite as a tarball
Downloaded latest sqlite source amalgamation
Unzipped pysqlite into its folder
Unzipped sqlite and copied that to the pysqlite folder
Opened setup.cfg and commented out all of the directives
In Terminal, went to the pysqlite folder, and then:
$ python setup.py build_static install
This compiled pysqlite using the libraries from the latest sqlite sources. And then in Python, I used it as:
import pysqlite2.dbapi2 as sqlite3
I recently installed python from source and used the following commands to install both SQLite from source and Python 2.7.13 from source.
for SQLite3 you can use the following commands
$SQLITE_INSTALL_LOCATION
$ curl -O http://www.sqlite.org/sqlite-autoconf-3070603.tar.gz
$ tar xvfz sqlite-autoconf-3070603.tar.gz
$ cd sqlite-autoconf-3070603
$ ./configure --prefix=$SQLITE_INSTALL_LOCATION --disable-static CFLAGS="-g"
$ make && make install
Then when I compiled my python I edited the setup.py in the root of the Python source
$ curl -O https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tgz
$ tar xvfz Python-2.7.13.tgz
Python-2.7.13/setup.py -- add the path to your SQLite install here:
```
...
# We hunt for #define SQLITE_VERSION "n.n.n"
# We need to find >= sqlite version 3.0.8
sqlite_incdir = sqlite_libdir = None
sqlite_inc_paths = [ '/usr/include',
'/usr/include/sqlite',
'/usr/include/sqlite3',
'/usr/local/include',
'/usr/local/include/sqlite',
'/usr/local/include/sqlite3',
$SQLITE_INSTALL_LOCATION/include,
]
...
Once you've changed the setup.py in your python source finish up compiling and installing python assuming the install location is $PYTHON_INSTALL_LOCATION
$ cd Python-2.7.13
$ LD_RUN_PATH=$SQLITE_INSTALL_LOCATION/lib ./configure --prefix=$PYTHON_INSTALL_LOCATION --enable-shared --enable-unicode=ucs4
$ LD_RUN_PATH=$SQLITE_INSTALL_LOCATION/lib make
$ LD_RUN_PATH=$SQLITE_INSTALL_LOCATION/lib make install
Once you do that you should have a Python version with SQLite3 support installed at $PYTHON_INSTALL_LOCATION/bin/python
Hope this helps!
Disclaimer: I'm not a Mac User, but by common knowledge i give you
this info.
You could follow the next instructions:
Use Homebrew
As this page mention: If you need to upgrade sqlite, you could use Homebrew.
Homebrew implies an aditional "software manager". So you should know how to use it before.
Install it from the source
As this page metion:
Download the sqlite-autoconf package
Compile it and install it:
:
$ tar xvfz sqlite-autoconf-3071502.tar.gz
$ cd sqlite-autoconf-3071502
$ ./configure --prefix=/usr/local
$ make
$ make install
Either Homebrew or Source, verfy it
>>> import sqlite3
>>> sqlite3.version_info
(2, 4, 1)
>>> sqlite3.sqlite_version_info
(3, 6, 11)
>>> from pysqlite2 import dbapi2 as sqlite3
>>> sqlite3.version_info
(2, 5, 5)
>>> sqlite3.sqlite_version_info
(3, 6, 18)
Maybe you need to uninstall previous version of pysqlite. In any way, you should read this answer to understand better the sqlite/python relationship.
https://pip.pypa.io/en/latest/installing.html
python get-pip.py
python [complete path]
python c:\folder\get-pip.py