I'm having a hard time installing PyObjC in mavericks. I read other discussions here too and used many different resources and still I get same error when I try to import. for example:
from AppKit import NSObject
gives me this in console:
/usr/local/Cellar/python/2.7.9/bin/python /Library/Python/2.7/site-packages/pyobjc_framework_Cocoa-3.1b1-py2.7-macosx-10.9-intel.egg/AppKit/__init__.py
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pyobjc_framework_Cocoa-3.1b1-py2.7-macosx-10.9-intel.egg/AppKit/__init__.py", line 9, in <module>
import Foundation
File "Foundation/__init__.pyc", line 9, in <module>
File "CoreFoundation/__init__.pyc", line 11, in <module>
File "CoreFoundation/_inlines.pyc", line 14, in <module>
File "CoreFoundation/_inlines.pyc", line 13, in __load
ImportError: 'CoreFoundation/_inlines.so' not found
What are your suggestions? Should I just delete all the modules and reinstall them. Has anyone been successful with the library in 10.9?
ps: I'm using Xcode 6.2
Thanks
Related
Im new to programming, so I have met this trouble.
I ve upgraded my pip and then used pip list, ipython notebook, jupyter notebook to use anaconda, so after all this commands I got one answer :
Traceback (most recent call last):
File "/home/bakhytgul/anaconda3/bin/pip", line 7, in <module>
from pip._internal import main
File "/home/bakhytgul/anaconda3/lib/python3.6/site-packages/pip/_internal/__init__.py", line 40, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "/home/bakhytgul/anaconda3/lib/python3.6/site-packages/pip/_internal/cli/autocompletion.py", line 8, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "/home/bakhytgul/anaconda3/lib/python3.6/site-packages/pip/_internal/cli/main_parser.py", line 12, in <module>
from pip._internal.commands import (
File "/home/bakhytgul/anaconda3/lib/python3.6/site-packages/pip/_internal/commands/__init__.py", line 6, in <module>
from pip._internal.commands.completion import CompletionCommand
File "/home/bakhytgul/anaconda3/lib/python3.6/site-packages/pip/_internal/commands/completion.py", line 6, in <module>
from pip._internal.cli.base_command import Command
File "/home/bakhytgul/anaconda3/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 19, in <module>
from pip._internal.download import PipSession
File "/home/bakhytgul/anaconda3/lib/python3.6/site-packages/pip/_internal/download.py", line 15, in <module>
from pip._vendor import requests, six, urllib3
File "/home/bakhytgul/anaconda3/lib/python3.6/site-packages/pip/_vendor/requests/__init__.py", line 97, in <module>
from pip._vendor.urllib3.contrib import pyopenssl
File "/home/bakhytgul/anaconda3/lib/python3.6/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py", line 46, in <module>
import OpenSSL.SSL
File "/home/bakhytgul/anaconda3/lib/python3.6/site-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/home/bakhytgul/anaconda3/lib/python3.6/site-packages/OpenSSL/crypto.py", line 13, in <module>
from cryptography.hazmat.primitives.asymmetric import dsa, rsa
File "/home/bakhytgul/anaconda3/lib/python3.6/site-packages/cryptography/hazmat/primitives/asymmetric/rsa.py", line 14, in <module>
from cryptography.hazmat.backends.interfaces import RSABackend
File "/home/bakhytgul/anaconda3/lib/python3.6/site-packages/cryptography/hazmat/backends/__init__.py", line 7, in <module>
import pkg_resources
File "/home/bakhytgul/anaconda3/lib/python3.6/site-packages/pkg_resources.py", line 1435, in <module>
register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
Can u help me to solve this issue, please? Thank u very much.
Im using:
- Ubuntu 16.04. (64bit)
- Python 2.7.12
- Python 3.6.0 :: Anaconda 4.3.1 (64-bit)
P.S: Ive tried to fix with dotenv, ensurepip(this got me answer that I dont have this package).
Not a full answer because I cannot tell you why this is happening, but hopefully this will help you find a solution.
I had been running into this problem with an venv. When I started from scratch trying to build rjsmin, everything went all right, that is when I noticed that the reason was that the venv that was failing was using Python 3.6, whereas the new venv was using Python 3.7.
According to your console output the anaconda you have is using 3.6, I think you might have break your install by manually upgrading packages using pip. You could try getting the newer version of anaconda, or go with a new, fresh install.
I just installed anaconda and I have udpated the PATH variable.
However, I cannot run any conda related commands.
Every time I run a command starting with "conda" I get the following error.
Can anyone help?
I am using macOs High Sierra 10.13.6.
Traceback (most recent call last):
File "/anaconda3/lib/python3.6/site-packages/conda/common/path.py", line 18, in <module>
from urllib.request import url2pathname
File "/anaconda3/lib/python3.6/urllib/request.py", line 2585, in <module>
from _scproxy import _get_proxy_settings, _get_proxies
ImportError: dlopen(/anaconda3/lib/python3.6/lib-dynload/_scproxy.cpython-36m-darwin.so, 2): Symbol not found: __cg_jpeg_resync_to_restart
Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /anaconda3/lib/libJPEG.dylib
in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/anaconda3/bin/conda", line 11, in <module>
sys.exit(main())
File "/anaconda3/lib/python3.6/site-packages/conda/cli/main.py", line 112, in main
from ..exceptions import conda_exception_handler
File "/anaconda3/lib/python3.6/site-packages/conda/exceptions.py", line 18, in <module>
from .common.io import timeout
File "/anaconda3/lib/python3.6/site-packages/conda/common/io.py", line 24, in <module>
from .path import expand
File "/anaconda3/lib/python3.6/site-packages/conda/common/path.py", line 21, in <module>
from urllib import unquote, url2pathname # NOQA
ImportError: cannot import name 'unquote'
I seem to recall something similar when I first ran Anaconda on my Mac as well. I believe I solved it by doing two things:
Uninstalling Anaconda (Link)
Reinstalling Anaconda (potentially in a different location, say, under your User home)
I think in the process of installation my PATH pointed finally to a different location than the Conda/Python install.
I can't figure out why jupyter-lab is not working. something is broken and don't know where. I have searched the web for this and can't find a solution. COuld you please help. Appreciate it.
E:\gitrepos>jupyter lab
`Traceback (most recent call last):
File "E:\anaconda3\Scripts\jupyter-lab-script.py", line 3, in <module>
import jupyterlab.labapp
File "E:\anaconda3\lib\site-packages\jupyterlab\labapp.py", line 7, in <module>
from notebook.notebookapp import NotebookApp, aliases, flags
File "C:\Users\Dario.Romero\AppData\Roaming\Python\Python35\site-packages\notebook\notebookapp.py", line 78, in <module>
from .services.kernels.kernelmanager import MappingKernelManager
File "C:\Users\Dario.Romero\AppData\Roaming\Python\Python35\site-packages\notebook\services\kernels\kernelmanager.py", line 19, in <module>
from jupyter_client.session import Session
File "E:\anaconda3\lib\site-packages\jupyter_client\session.py", line 61, in <module>
from jupyter_client.jsonutil import extract_dates, squash_dates, date_default
File "E:\anaconda3\lib\site-packages\jupyter_client\jsonutil.py", line 11, in <module>
from dateutil.parser import parse as _dateutil_parse
ImportError: No module named 'dateutil.parser'`
You need to install the dateutil library: https://pypi.python.org/pypi/python-dateutil/
(If you used a package manager, the dependencies for JupyterLab should already have been installed. If you didn't, then you will need to install the dependencies yourself.)
I've been following this guide. Unfortunately I don't think llvmpy is being installed properly (here is the output from python).
>>> import numba
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/numba/__init__.py", line 5, in <module>
from . import testing, decorators
File "/Library/Python/2.7/site-packages/numba/decorators.py", line 7, in <module>
from numba.targets import registry
File "/Library/Python/2.7/site-packages/numba/targets/registry.py", line 3, in <module>
from numba.targets import cpu
File "/Library/Python/2.7/site-packages/numba/targets/cpu.py", line 4, in <module>
import llvm.core as lc
File "llvm/__init__.py", line 6, in <module>
from llvmpy import extra
File "llvmpy/extra.py", line 5, in <module>
from llvmpy import capsule
File "llvmpy/capsule.py", line 4, in <module>
from llvmpy._capsule import (unwrap, has_ownership, downcast, wrap,
ImportError: No module named _capsule
Doing python -c "import llvm" gives me the same error as above ("No module named _capsule"). Any ideas? I am not getting errors while installing llvm,llvmpy or numba, but it is pretty clear that llvmpy isn't getting installed properly
I forgot to answer this. I solved the problem as the underlying issue was an Apple-release (see this answer to a similar'ish question).
TLDR:
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
And then follow the guide given here
I am trying to compile a python script for visualization of protein molecules using py2exe module. I've python2.7 running in win7 x64. When I try to execute the compiled file, it gives this error:-
C:\Python27\dist>visualn.exe
Traceback (most recent call last):
File "visualn.py", line 19, in <module>
File "MMTK\__init__.pyc", line 39, in <module>
File "Scientific\Geometry\__init__.pyc", line 30, in <module>
File "Scientific\Geometry\VectorModule.pyc", line 9, in <module>
File "Scientific\N.pyc", line 1, in <module>
ImportError: No module named Scientific_numerics_package_id
Without compiling I can run the script successfully. I've already installed scientific,MMTK modules. I got somewhere in the internet that Scientific_numerics_package_id module is available in netCDF4, so I installed that also but no good.
Any idea about the error?
You need the python-netcdf package.