When importing scipy:
from scipy import signal
I get the errors:
Traceback (most recent call last):
File "F:\Desktop\Programming\Python\Sample Programs\src\butter.py", line 7, in <module>
from scipy import signal
File "C:\Python34\lib\site-packages\scipy\signal\__init__.py", line 280, in <module>
from .bsplines import *
File "C:\Python34\lib\site-packages\scipy\signal\bsplines.py", line 12, in <module>
from scipy.special import comb, gamma
File "C:\Python34\lib\site-packages\scipy\special\__init__.py", line 601, in <module>
from ._ufuncs import *
ImportError: DLL load failed: The specified module could not be found.`
I am running Eclipse on windows 7. I installed scipy successfully using
pip3.4 install "scipy-0.16.0rc1-cp34-none-win32.whl"
Can you tell me how I can get scipy to work with this simple program on Windows 7?
As mentioned prior, the easiest way to get SciPy running on windows is to simply download the Anaconda distribution. Be sure to obtain the version you want. It works out of the box. Plus you get Jupyter/IPython Notebook which is a really cool interactive GUI interface. It's almost like working in Matlab!
http://continuum.io/downloads
Related
I am trying to install requests library using pip install requests.
Could not import runpy module
Traceback (most recent call last):
File "C:\Users\ga\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 15, in
import importlib.util
File "C:\Users\ga\AppData\Local\Programs\Python\Python310\lib\importlib\util.py", line 14, in
from contextlib import contextmanager
File "C:\Users\ga\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 5, in
from collections import deque
ModuleNotFoundError: No module named 'collections'
PS C:\Users\gae\Documents\MoldingMachine>
keeps telling me that. I don't know why it doesnt let me install it
Windows 10
Python 3.8
CUDA 11.5
I've installed what I believe to be a matching pycuda from this file:
pycuda-2021.1+cuda115-cp38-cp38-win_amd64.whl
This simple example fails
import pycuda.driver as drv
drv.init()
print("Detected {} CUDA devices".format(drv.Device.count()))
With this error:
Traceback (most recent call last):
File "C:/University of Arizona/weeds/tests/cuda-summary.py", line 5, in <module>
import pycuda.driver as drv
File "C:\Users\evan\AppData\Local\Programs\Python\Python38\lib\site-packages\pycuda\driver.py", line 65, in <module>
from pycuda._driver import * # noqa
ImportError: DLL load failed while importing _driver: The specified procedure could not be found.
NVCC is in my path
Adding os.add_dll_directory(os.path.join(os.environ['CUDA_PATH'], 'bin')) has no effect
The script works just fine on my Jetson Nano
Any ideas on how to get past this? I've searched and tried several solutions.
It is quite strange, but updating the Nvidia display driver fixed the issue for me.
But in my case there was no issue on my PC with the same versions of Windows, Python, CUDA and PyCuda. The issue appeared on the different Windows 10 machine, when launching the exe, packaged by PyInstaller. So, updating the display driver was the fix for this machine.
I'm using ubuntu 16.04 and python files that were using vpython that were working fine before now crash showing
from visual import *
ImportError: No module named visual.
I installed anaconda, still nothing. I launched jupyter notebook on the terminal, it opens on a new window in google chrome. I created a test.py file containing just
import vpython
and it prompts:
Traceback (most recent call last):
File "teste vpython.py", line 1, in <module>
import vpython
File "/home/user/anaconda2/lib/python2.7/site-
packages/vpython/__init__.py", line 10, in <module>
from .vpython import *
File "/home/user/anaconda2/lib/python2.7/site-
packages/vpython/vpython.py", line 507, in <module>
get_ipython().kernel.comm_manager.register_target('glow', GlowWidget)
AttributeError: 'NoneType' object has no attribute 'kernel'
I would appreciate if somebody could help me. I know there are similar tags, but I did as every answer I checked as suggested with no results.
Thank you.
I have Ubuntu 16.04 with Anaconda and Python 3.6. Just now I created another environment that contains Python 2.7. In that environment I did "pip install vpython --upgrade" and verified with "pip show vpython" that the version is indeed 7.0.3. I then executed "jupyter notebook" and demo programs ran fine.
I am puzzled by your comment that you created a test.py file, and by the line that says "File "teste vpython.py", line 1, in ". I would expect a file with the .ipynb extension, so something doesn't seem right.
I'll advertise that a better place to pose VPython questions is in the VPython forum at
https://groups.google.com/forum/?fromgroups&hl=en#!forum/vpython-users
Does anyone know how to undo the changes to paths and permissions wrought by upgrading to El Capitan. Specifically, it appears that OS X is now using the system python instead of my Canopy installation.
These look ok:
Michaels-Mac-mini:~ mellis$ which python
/Users/mellis/Library/Enthought/Canopy_64bit/User/bin/python
Michaels-Mac-mini:~ mellis$ which ipython
/Users/mellis/bin/ipython
But trying to launch ipython fails:
Michaels-Mac-mini:~ mellis$ ipython
Traceback (most recent call last):
File "/Users/mellis/bin/ipython", line 5, in <module>
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/pyth on/pkg_resources.py", line 2793, in <module>
working_set.require(__requires__)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 673, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 576, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: ipython==0.11
A complete update of my installed Canopy packages including ipython seems to have fixed the problem.
A similar question was asked before by someone else: https://stackoverflow.com/questions/23600028/py2app-app-crashes-on-earlier-mac-os-x-versions
I have an app that runs fine on my machine (OSX 10.9.4), but when I move it to another machine running 10.7.5, the app crashes on start up. I get the following messages in console:
Traceback (most recent call last):
File "/PATH_TO_APP/APP.app/Contents/Resources/__boot__.py", line 3
_recipes_pil_prescript(['Hdf5SubImagePlugin', 'FitsStubImagePlugin', 'SunImagePlugin', 'GbrImagePlugin', 'Jpeg2KImagePlugin', 'MicImagePlugin', 'FpxImagePlugin', ImImagePlugin', ...
File "/PATH_TO_APP/APP.app/Contents/Resources/__boot__.py, line 3
from PIL import Image
File "PIL/Image.pyc", line 62, in <module>
File "PIL/_imaging.pyc", line 14, in <module>
File "PIL/_imaging.pyc", line 10, in __load
ImportError: dlopen(/PATH_TO_APP/APP.app/Contents/Resources/lib/python2.7/lib-dynload/PIL/_imaging.so, 2): Symbol not found: ___sincos_stret
Referenced from /PATH_TO_APP/APP.app/Contents/Resources/lib/python2.7/lib-dynload/PIL/_imaging.so
Expected in: /usr/lib/libSystem.B.dylib
in /PATH_TO_APP/APP.app/Contents/Resources/lib/python2.7/lib-dynload/PIL/_imaging.so
Earlier, to get around this error, I just uninstalled pillow. I'm not sure why pillow libraries were being added to the app to begin with, since I didn't think I was using it. But now, when attempting this workaround, I get another error:
Traceback (most recent call last):
File "/PATH_TO_APP.app/APP.app/Contents/Resources/__boot__.py", line 384, in <module> _recipes_pil_prescript([])
File "/PATH_TO_APP.app/APP.app/Contents/Resources/__boot__.py", line 344, in _recipes_pil_prescript from PIL import Image
File "/usr/local/lib/python2.7/site-packages/PIL/Image.py", line 62, in <module>
ImportError cannot import name _imaging
Apparently I'm using PIL now somehow. My script imports the following:
from __future__ import division
import easygui as eg
import os, zlib, re, datetime, getpass, tkMessageBox, sys
import zipfile as z
import Tkinter as tk
from tkFileDialog import askdirectory
from optparse import OptionParser
Here's my setup.py:
from setuptools import setup
APP = ['zipperscript.py']
DATA_FILES = []
OPTIONS = {'argv_emulation': True, 'excludes': ['']}
setup(
app=APP,
name="Zipperscript_HI_50",
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
version="Hawaii branch 4.0.50"
)
I'm not sure that the OS version is causing the problem, but that's my theory right now. I'm not sure how to proceed. Any help or suggestions are greatly appreciated.
I encountered a similar problem while using buildout on Mac OS 10.8.5. It seems that the pre-compiled packages available on Pypi have been compiled on newer versions of OS X and unfortunately insufficiently tested on older versions.
The solution is to install pillow from source instead. Download the source, and run pip install your_downloaded_file. You may need to install dependencies such as libjpeg and zlib beforehand.
After doing this I do not encounter the errors anymore and have pillow version 5.4.0 installed.