PyQt5 installation error in Virtual Environment Mac - pyqt5

I am trying to install PyQt5 under virtual environment in Mac system.However i am receivng the error that "preparing metadata (pyproject.toml) ... error" and it gets stuck there. I have arequirement to get it going with python 3.9.5 only. However outside virtual it works well.Even using Conda,,i tried .Itr worked well but the virtual environment was created inside Conda environment... Could there any ways i could fix this error ""preparing metadata (pyproject.toml) ... error" while trying to install PyQt5 under the project virtual environment.. Or can i create a virtual environment using Conda which will be isn

Related

Numpy is not working after set up new virtual environment (in both base and new env)

why setting up a virtual environment is giving so many issue? Firstly pandas not working but it is in pip list.
I uninstall pandas and reinstall, it doesn't work. I then uninstall anaconda and reinstall again then it work.
Now numpy is not working in base environment and new environment. I uninstall and reinstalled. It doesn't work.
Am I doing anything wrong during the setting up new env? or it is python bug?
Thanks in advance.
Make sure you are activating the virtual environment prior to installing packages for that specific project & deactivating environment when finished working on that project.

Removed Python, can I still use the the virtual environment?

I created a virtual environment using python3.9 -m venv myenv
Now I activate it using source myvenv/bin/activate.
I suppose from this virtual enviroment is some dependency or link created to the installed Python version.
When I uninstall python3.9 can I still launch my python script with this activated virtual enviroment?
no you wont be able to run python applications anymore.
refer https://docs.python.org/3/library/venv.html
venv — Creation of virtual environments¶
New in version 3.3.
Source code: Lib/venv/
The venv module provides support for creating lightweight “virtual environments” with their own site directories, optionally isolated from system site directories. Each virtual environment has its own Python binary (which matches the version of the binary that was used to create this environment) and can have its own independent set of installed Python packages in its site directories.
See PEP 405 for more information about Python virtual environments.
If deleting the installed Python version affects the further use of any virtual environment depends wether option symlinks or copies was used when the virtual environment was created.
From Python docs for module venv, Creating virtual environments:
It also creates a bin (or Scripts on Windows) subdirectory containing a copy/symlink of the Python binary/binaries (as appropriate for the platform or arguments used at environment creation time).
Emphasis mine, to note that the role of the installed Python version depends on options.
The installed Python version is still a dependency, when at the time of creation symlinks have been used. If copies have been used, then the virtual environment is independent of the Python installed version and it can be removed.
See the options:
--symlinks Try to use symlinks rather than copies, when symlinks
are not the default for the platform.
--copies Try to use copies rather than symlinks, even when
symlinks are the default for the platform.
See also: PEP 405: Copies versus symlinks

PyCharm 2018.2.4 and Anaconda 5.3.0

Mine is Anaconda 5.3.0
When I run .py in PyCharm 2018.2.4, why it shows that:
ImportError:
DLL load failed: The specified module could not be found.
ImportError:
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control). Otherwise reinstall numpy.
Original error was: DLL load failed: The specified module could not be found.
It seems that PyCharm 2018.2.4 cannot import numpy??
Does anyone see this problem too? How to fix it? Thank you very much.
You can set the Python interpreter path on PyCharm to the Anaconda one (something like ~/anaconda3/bin/python).
Todo do so, open the Settings dialog >> Project: [ProjName] in the left panel >> Project Interpreter. Now you can add to the list paths to local Python interpreters, or virtual environments in the project folder or in a folder specified in the WORKON_HOME.
More instructions here and here.
I believe I have useful information if not the solution.
I too received the error using python to import numpy from the windows command prompt. Then I realized I could succeed if I used the Anaconda prompt. Curious about the difference, I exited python and examined the PATH environment variable. As I had hoped, it contained Anaconda references that did not exist in the Windows PATH. At the command prompt I typed: path > p.txt and hit enter to create a file since the string was so long. When I opened the file in notepad I copied the Anaconda references to the clipboard (C:\Users\laptop\Anaconda3;C:\Users\laptop\Anaconda3\Library\mingw-w64\bin;C:\Users\laptop\Anaconda3\Library\usr\bin;C:\Users\laptop\Anaconda3\Library\bin;C:\Users\laptop\Anaconda3\Scripts;C:\Users\laptop\Anaconda3\bin;) then used the Advanced Settings under the System Control Panel to Edit the Environment Variable and paste it on the beginning of PATH. The problem seems to have gone away, both in the Windows shell and in Pycharm.
First, try to delete .git file from project folder and re-enable vcs. Then uninstall numpy by:
pip3 uninstall numpy
After that, go to pycharm and open File > settings > Project Intepreter get the python location url ex: usr/bin/python3. Copy that path and open terminal and type:
usr/bin/python3 install numpy. Wait for pycharm indexing and try to run project again
I don't think it's an issue with PyCharm.
I got Anaconda 5.3 today and use PyCharm Pro 2018.2.4. Unfortunately, I got the same error as you do. However, if you go to powershell (if you are on Windows like me), type in python and import numpy you still got the same error.
Not sure why yet but uninstall & reinstall didn't help (and tbh I don't get why this might help in any sense though).
So my current solution is:
Roll back to Anaconda 5.2 with Python 3.6 and everything gets back to working.
I have the same thing, pychrm 2018.2 & Anaconda3 (64-bit) 5.3 on win10
I think the issue is about Anaconda, I have uninstalled the Anaconda 5.3 and installed Anaconda 5.2, then everything is ok

anaconda installing numpy/pandas/matplotlib error

first post here, so I'm going to try to be as thorough as possible.
I'm trying to install numpy/matplotlib/pandas for a project. First time trying to use them. I'm following the steps of a tutorial, so I can't vary from that too much (have to use anaconda). I'm using mac OS Sierra 10.12.5
What I've done:
installed python 3, anaconda, and create and initialize a virtual environment using Anaconda. I then type:
conda install numpy pandas matplotlib
The terminal then tells me what new packages will be installed, I proceed. A few are installed successfully, and then I get this error:
CondaError: CondaHTTPError: HTTP None None for url https://repo.continuum.io/pkgs/free/osx-64/mkl-2017.0.3-0.tar.bz2
Elapsed: None
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.
I thought this might be a connection issue, as I'm in China, but I've tried multiple times both using and not using a VPN. This problem is really stopping me in my tracks, any ideas?
Have you tried using the pip installer, or installing using the Anaconda navigator? To install using pip, after creating the virtual environment, open a terminal console, and type
source activate [name of virtual environment]
pip install numpy
pip install matplotlib
pip install pandas
Pip is included in the base anaconda installation, so this should work. If your Anaconda installation included the Anaconda Navigator, you can also install these modules through the GUI, by opening the Anaconda Navigator, clicking on the environments tab, selecting the virtual environment, searching for module in the search bar (make sure you select All and not Installed in the dropdown menu next to it), and then selecting the desired modules and clicking the apply button (this is an example).

Is it possible to compile tensorflow in Mac?

So I started to build tensorflow in Mac and the thing is that it doesn't seem possible to build tensorflow in Mac OS platform.
After following instructions in here, I get this package directory.
It seems like the build settings for bazel is only for linux distro. The reason why I thought so is because there is a .so file in package directory that is needed to be linked after importing tensorflow using python binary.
This is the result I get after importing tensorflow using python.
Is there any other way I can build tensorflow on Mac OS?
It seems like there are no options but to install tensorflow with pip. So I just created a new virtual machine and installed ubuntu 16.04 to use it as my docker host. By doing so, I can create a new docker container which can now link and execute the linux library.