Comments (7)
Hi! I'm not sure this is a problem with p2p. The error says "No module named numpy", so it looks like something went wrong with your NumPy installation. You might want to debug that first:
- Does
python -c 'import numpy'
give you an error? - What does
which numpy
say where it is installed? Is that installation location part of thePATH
variable?
Once NumPy is found on the PATH
, p2p should install correctly.
from pulse2percept.
*I made a new venv and tried to install everything again.
Hey, thanks for your fast answer!
Does python -c 'import numpy' give you an error?
No, there is no Error
What does which numpy say where it is installed? Is that installation location part of the PATH variable?
(sensormonitor) ➜ sensormonitor which numpy
numpy not found
(sensormonitor) ➜ sensormonitor pip show numpy
Name: numpy
Version: 1.24.3
Summary: Fundamental package for array computing in Python
Home-page: https://www.numpy.org
Author: Travis E. Oliphant et al.
Author-email:
License: BSD-3-Clause
Location: /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages
Requires:
Required-by: scipy
(sensormonitor) ➜ sensormonitor export PYTHONPATH=$PYTHONPATH:/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages
(sensormonitor) ➜ sensormonitor pip install pulse2percept
Collecting pulse2percept
Using cached pulse2percept-0.8.0.tar.gz (7.3 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [23 lines of output]
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/bq/1yg3b4896h1dgcl9p04xbzw40000gn/T/pip-build-env-s73ew12h/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/bq/1yg3b4896h1dgcl9p04xbzw40000gn/T/pip-build-env-s73ew12h/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
self.run_setup()
File "/private/var/folders/bq/1yg3b4896h1dgcl9p04xbzw40000gn/T/pip-build-env-s73ew12h/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 488, in run_setup
self).run_setup(setup_script=setup_script)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/bq/1yg3b4896h1dgcl9p04xbzw40000gn/T/pip-build-env-s73ew12h/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 338, in run_setup
exec(code, locals())
File "<string>", line 318, in <module>
File "<string>", line 253, in setup_package
File "<string>", line 122, in openmp_build_ext
ModuleNotFoundError: No module named 'numpy'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
(sensormonitor) ➜ sensormonitor
I dont know whats the problem, but I think there is a problem with my python/numpy installation. I tried like everthing, but doesn't get it to work.
Here is the Path
(sensormonitor) ➜ sensormonitor ls /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages
Cython numpy-1.24.3.dist-info
Cython-0.29.35.dist-info pip
README.txt pip-23.1.2.dist-info
__pycache__ pkg_resources
_distutils_hack pyximport
certifi scipy
certifi-2023.5.7.dist-info scipy-1.10.1.dist-info
cython.py setuptools
distutils-precedence.pth setuptools-65.5.0.dist-info
numpy
(sensormonitor) ➜ sensormonitor
I even tried to uninstall numpy and then installed it only in the venv and tried to force install pulse2percept with the numpy module in the venv. But it also dont work. Same ERROR as above.
from pulse2percept.
Hi! It looks like there's a mismatch with your package installation paths.
If you run which pip
and which python
(with your venv activated) what do these return? What about echo $PATH
?
from pulse2percept.
If you run which pip and which python (with your venv activated) what do these return? What about echo $PATH?
➜ sensormonitor which pip3
/Library/Frameworks/Python.framework/Versions/3.11/bin/pip3
➜ sensormonitor which python
/usr/local/bin/python
➜ sensormonitor echo $PATH
/Library/Frameworks/Python.framework/Versions/3.11/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Library/Frameworks/Python.framework/Versions/3.11/bin:/opt/homebrew/bin:/opt/homebrew/sbin
➜ sensormonitor
Here is a ls of all my python files in /usr/local/bin/
➜ bin ls *python*
python python3-config python3.11 python3.11-intel64
python3 python3-intel64 python3.11-config
from pulse2percept.
Hmm... I'm not sure what the issue could be. This doesn't seem to be an issue necessarily with pulse2percept.
It seems you have both Homebrew Python (/usr/local/bin/python
) and the official Python install from their website (.../Python.framework/Versions/3.11/bin/python
), and this might be causing the conflict.
It does look like there's a mismatch between your python directory & your pip directory, but I'm not sure if this would affect pip/setuptools. Try using python -m pip install [package]
instead of pip3 install [package]
?
FWIW, Homebrew Python's site packages dir is at /usr/local/lib/python3.11/site-packages
.
Also, on Python 3.11, pulse2percept can only be installed using the source code and pip install -e .
, and not pip install pulse2percept
. (This won't fix the numpy import problem, but I did some testing locally and even if numpy is found the install will fail on python3.11 unless you are installing from source code.)
EDIT: Also, what kind of venv are you using? It doesn't seem to be affecting your PATH.
from pulse2percept.
Hey, i tried to install it via source code, but got the same error. I used Pycharm and VSCode but on both i dont get it running. I have to use the module for a homework. But i think i will go back to Google Colab and use it there. So i think we can close this issue.
Thanks alot for your time and help! (:
EDIT:
I uninstalled pyhton via homebrew, cleanup and reinstalled. Then i used Pycharm and it installed p2p without error from source. But when i Try the following:
import numpy
import pulse2percept as p2p
logo = p2p.stimuli.LogoBVL()
print(logo)
I get this:
/Users/****/PycharmProjects/sensomoni/venv/bin/python /Users/****/PycharmProjects/sensomoni/p2p.py
Traceback (most recent call last):
File "/Users/****/PycharmProjects/sensomoni/p2p.py", line 4, in <module>
logo = p2p.stimuli.LogoBVL()
^^^^^^^^^^^^^^^^^^^^^
File "/Users/****/PycharmProjects/sensomoni/pulse2percept/pulse2percept/stimuli/images.py", line 727, in __init__
super(LogoBVL, self).__init__(source, format="PNG",
File "/Users/****/PycharmProjects/sensomoni/pulse2percept/pulse2percept/stimuli/images.py", line 85, in __init__
img = imread(source, format=format)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/****/PycharmProjects/sensomoni/venv/lib/python3.11/site-packages/skimage/io/_io.py", line 53, in imread
img = call_plugin('imread', fname, plugin=plugin, **plugin_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/****/PycharmProjects/sensomoni/venv/lib/python3.11/site-packages/skimage/io/manage_plugins.py", line 205, in call_plugin
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/Users/****/PycharmProjects/sensomoni/venv/lib/python3.11/site-packages/skimage/io/_plugins/imageio_plugin.py", line 11, in imread
out = np.asarray(imageio_imread(*args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/****/PycharmProjects/sensomoni/venv/lib/python3.11/site-packages/imageio/v3.py", line 54, in imread
return np.asarray(img_file.read(**call_kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: PillowPlugin.read() got an unexpected keyword argument 'format'
Process finished with exit code 1
from pulse2percept.
I'm glad you were able to get it installed!
Yes, there seem to be issues with scikit-image/imageio in pulse2percept's ImageStimulus module right now. I'll open an issue for it.
For now, this should be fixed by reverting to scikit-image==0.20.0
and imageio==2.26.1
.
from pulse2percept.
Related Issues (20)
- [BUG] Metadata not copied for unique time points
- [BUG][DOC] Issues with Perez-Fornos dataset
- [BUG] ImageStimulus constructor passes unexpected arg to imread() HOT 2
- [ENH] Refactor stimulus for biphasic pulse trains and metadata
- [BUG] Jax for BiphasixAxonMap silent error when rebuilt
- [BUG] microns to dva plotting error HOT 2
- [BUG] Cortex installation fails on colab HOT 5
- [BUG] Installation fails without certain requirements-dev requirements
- [BUG] ImageStimulus crop is broken
- [BUG] Can't mix and match BiphasicAxonMapModel HOT 2
- [BUG] Cortex model plotting fails if model isn't built
- [REF] Use pyproject.toml
- [Question] BiphasicAxonMapModel paper-code discrepancy HOT 2
- [BUG][MNT] Package organization for cortex submodules
- [BUG] Fast math no longer fast
- [DOC] Add EnsembleImplant to cortex docs
- [BUG] pip install fails in python 3.11 HOT 2
- [ENH] Add Hou 2024 dataset
- [ENH][REF] Add implementation for torch backend in the scoreboard model
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pulse2percept.