I have been trying to run my django project on my new macbook Apple M1 Chip machine but only to encounter the error below.
I have tried to ensure that arch command returns i386 on both pycharm and system terminal but still not working.
ImportError: dlopen(/Users/harmankibue/.virtualenvs/wwsb_env/lib/python3.9/site-packages/srsly/ujson/ujson.cpython-39-darwin.so, 2): no suitable image found. Did find:
/Users/harmankibue/.virtualenvs/wwsb_env/lib/python3.9/site-packages/srsly/ujson/ujson.cpython-39-darwin.so: mach-o, but wrong architecture
/Users/harmankibue/.virtualenvs/wwsb_env/lib/python3.9/site-packages/srsly/ujson/ujson.cpython-39-darwin.so: mach-o, but wrong architecture
Try this,
Go to Application folder -> Right click on Terminal App -> Get Info
Tick Open with Rosetta option.
build the project now.
I had Python 3.8.10 in my mac OS and was facing this same error after installing numpy version 1.21.x.
Reinstalling numpy with a lower version of 1.19.2 worked for me and I stopped seeing such errors.
Installing the Intel .dmg version of PyCharm solved this issue for me, after trying lots of ways all through the day
Related
I have to try to install SimpleITK Elastix on Windows 10. I have the toolchain (Windows 10, Anaconda3, python 3.7 , MSVS 2019, Cmake 3.7, git,) and source code (SimpleITK v1.2, SimpleElastix KIT). It do all steps all right but after run python setup install I open python interpreter shell for list the modules of SimpleITK package print (dir(istk)) and the modules 'Elastix', 'ElastixImageFilter', 'ElastixImageFilter_swigregister' are not listed. I have tried on Ubuntu 18.04 and I have goten it. I have tried why the same process work on Ubuntu 18.04 and not on Windows 10, but I don't see differences. I need work with SimpleElastix kit on Windows 10, I have list the location of packages and the results are
import sys
sys.path
['', 'C:\\Users\\usuario\\Anaconda3\\python37.zip', 'C:\\Users\\usuario\\Anaconda3\\DLLs', 'C:\\Users\\usuario\\Anaconda3\\lib', 'C:\\Users\\usuario\\Anaconda3', 'C:\\Users\\usuario\\Anaconda3\\lib\\site-packages', 'C:\\Users\\usuario\\Anaconda3\\lib\\site-packages\\simpleitk-1.2.0rc2.dev1167+gd4cf2-py3.7-win-amd64.egg', 'C:\\Users\\usuario\\Anaconda3\\lib\\site-packages\\win32', 'C:\\Users\\usuario\\Anaconda3\\lib\\site-packages\\win32\\lib', 'C:\\Users\\usuario\\Anaconda3\\lib\\site-packages\\Pythonwin']
I can see the package 'C:\Users\usuario\Anaconda3\lib\site-packages\simpleitk-1.2.0rc2.dev1167+gd4cf2-py3.7-win-amd64.egg'. I think that Elastix modules are anywere in the file system but python dont get to load them.
Can you help me, please? Thanks in advance. PD: I am trying to install this library for a week :(
great day for me. The post Install SimpleElastix on Windows for Python is the solution. Specifically the first point:
1- Re-install Anaconda3, add to PATH while installing (although it's not recommended by the installer). Make sure Python can be accessed by the system by checking in cmd. Just type "python" and see if its version pops out.
I would like know why reinstalling Anaconda its the solution. Heuristic method for not experts but the solution its not in the FAQs of tool sources.
Thanks a lot to stackoverflow
Cándido
There are many error reports on 'The system cannot find the file specified', but almost all are very old threads with solutions not working now. And only a single query for similar problem for anaconda prompt without any solution.
When I open the anaconda prompt, the error message appears, but the commands work fine, except for the commands when i create new environment. I can not install or update any packages/libraries inside the created environment and prompt gives following error each time the error
conda install keras
Fetching package metadata ...
CondaHTTPError: HTTP 000 CONNECTION FAILED for url https://conda.anaconda.org/anaconda------/repodata.json
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
SSLError(SSLError("Can't connect to HTTPS URL because the SSL module is not available.",),)
Solutions I have tried
Uninstalling and reinstalling anaconda3 - both 32 and 64 versions i have tried. I also tried restarting the laptop after uninstalling and befor installing fresh. I followed every step mentioned at https://docs.anaconda.com/anaconda/install/uninstall/
Executing following command from command prompt - [conda config --set ssl_verify no]
Creating the pip.ini file inside pip folder and updating with lines mentioned in this thread.
https://stackoverflow.com/a/52764896/11107306
Browsing through all drivers including display and network drivers for updates and updating them if necessary.
Adding system path variable for anaconda
Downloading and installing Win64OpenSSL application.
Cleaning conda using conda clean --all inside environment and then trying to install again, with n o success.
My system details
OS - Windows 8.1
Platform - win64
Anaconda - 2019.10
Conda version - 4.7.12
Python -3.7.4 (Its work laptop with python 2.7.13 default on command prompt- preinstalled, which I can not remove.)
NVIDIA GTX 960M (updated driver) with Cuda version 9
Please kindly help me. I have wasted almost whole day in this. Or should I just go for other alternative? Kindly suggest good alternative for anaconda, I will be needing machine learning based libraries for my project. Thank you in advance.
This solution worked for me from github.
https://github.com/conda/conda/issues/8273 I have copied the following files libcrypto-1_1-x64.* libssl-1_1-x64.* from D:\Anaconda3\Library\bin to D:\Anaconda3\DLLs.
And this worked very well for condaHTTPerror. Now I can install using conda even within created environment.
However I am still getting the message on prompt 'The system can not find the file specified' each time I open the prompt or carry out the command. How I can resolve this issue? kindly help.
copying the following files
libcrypto-1_1-x64.*
libssl-1_1-x64.*
from bin library to DLLS library worked for me
from C:\users\Alex\Anaconda3\Library\bin to C:\users\Alex\Anaconda3\DLLs.
I have uninstalled Python and now I cant install it anymore (error 0x800705b4). Has anybody encountered this error ? I have tried different versions but nothing works.
You can try Anaconda for Windows which has seperate environments.
The solution I would recommend though is to use WinPython, which after install is just a folder with everything you need, doesn't change a thing in your windows environment and still works great! There is also a version that comes with the most used packages already installed, give it a try!
No need to mess with environments, just use a different WinPython folder for your projects!
Got the same error after a little digging I found the below thing...It works like a charm...
First...Make sure to check the setup package for your system which is X86 or x64, download packages based on the system before you proceed, otherwise, the hack won't work. The below is explained for x64 bit windows 8.1 system with a 64 bit Python setup package use the below-mentioned setup name(.exe file) in Step1: and search in google for downloading the Python setup
Start CMD as Admin, after that
Step1: ~YourFilePath/python-3.5.0-amd64.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0
Step2:
~YourFilePath/python-3.5.0-amd64.exe
~YourFilePath stands for the location of the python-3.5.0-amd64.exe file on your PC Example: E:\Softwares\python-3.5.0-amd64.exe
now after executing Step2: the setup will run without any errors..... Cool...
The above-mentioned steps should work or else If you find any difficulties please visit here which explains the process in detail. Good Luck...
Credits to this answer
Eventually what did the trick for me was to roll back the previous microsoft update (KB4512575)
I am using python 3.5 and I am doing Algorithms specialization courses on Coursera. Professor teaching this course posted a program which can help us to know the time and memory associated with running a program. It has import resource command at the top. I tried to run this program along with the programs I have written in python and every time I received ImportError: No module named 'resource'
I used the same code in ubuntu and have no errors at all.
I followed suggestions in stackoverflow answers and I have tried adding PYTHONPATH PYTHONHOME and edited the PATH environment variable.
I have no idea of what else I can do here.
Is there any file that I can download and install it in the Lib or site-packages folder of my python installation ?
resource is a Unix specific package as seen in https://docs.python.org/2/library/resource.html which is why it worked for you in Ubuntu, but raised an error when trying to use it in Windows.
I ran into similar error in window 10. Here is what solved it for me.
Downgrade to the Apache Spark 2.3.2 prebuild version
Install (or downgrade) jdk to version 1.8.0
My installed jdk was 1.9.0, which doesn't seem to be compatiable with spark 2.3.2 or 2.4.0
make sure that when you run java -version in cmd (command prompt), it show java version 8. If you are seeing version 9, you will need to change your system ENV PATH to ensure it points to java version 8.
Check this link to get help on changing the PATH if you have multiple java version installed.
Hope this helps someone, I was stuck on this issue for almost a week before finally finding a solution.
I have installed the packages TensorFlow and scikit_learn and all its dependencies. When I try importing them using python 2.7.6 or 2.7.10 (I have tried both) in the terminal, it works fine. However, when I do it using pycharm it gives an error.
In the case of scikit_learn with the launcher 2.7.6 says:
ImportError: dynamic module does not define init function (init_check_build)
In the case of scikit_learn with the launcher 2.7.10 says:
ValueError: numpy.dtype has the wrong size, try recompiling
In the case of TensorFlow with the launcher 2.7.6 says:
ImportError: dlopen(/Library/Python/2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so, 2): no suitable image found. Did find:
/Library/Python/2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so: mach-o, but wrong architecture
In the case of TensorFlow with the launcher 2.7.10 says:
ImportError: No module named copyreg
Error importing tensorflow. Unless you are using bazel,
you should not try to import tensorflow from its source directory;
please exit the tensorflow source tree, and relaunch your python interpreter
from there.
I have tried to search in the net but the solutions did not work for me. I have tried to uninstall them and install them again with pip, conda and directly the source code and it gives always the same errors. I have even tried reinstalling pycharm with no better luck.
Other libraries, such as scilab or numpy, work fine in pycharm.
Any ideas? It is just driving me mental. By the way, I am using a Mac OS 10.10.5.
you should start PyCharm from terminal
cd /usr/lib/pycharm-community/bin
./pycharm.sh
Add this 'DYLD_LIBRARY_PATH=/usr/local/cuda/lib' to Python environment variable. Run-> Edit Configurations -> Environment variables. Hope it works.
At the end, I ended up creating a virtual environment, reinstalling everything in there, and calling it through pycharm. I am not entirely sure what was the problem between conda and pycharm, I probably messed up somewhere.
I am now using a different virtual environment depending on the project and I am happier than ever :).
I had a similar problem. My code was was not working on PyCharm professional. I had PyCharm CE previously installed and it worked from there. I had configured PyCharm CE a while ago and I had forgotten what setup I used but if issues persist, make sure that the packages are installed under Preferences > Project > Project Interpreter
hey if there are people still with this problem I would like to tell you the solution. It works for me everytime.
1.Open Pycharm
2.Open PyCharmProject or the folder you are using
3.Click File and there Settings
4.Click Project: PyCharmProjects , there project interpreter
5.Select the global virtual enviroment for this ( including photo thats showing what i did )
6.Check if there are all packages you have installed